- Notifications
You must be signed in to change notification settings - Fork 978
Closed
Labels
Description
Version
Other
What happened?
Hint: I am using v1.13.0 (installed via brew) but that is not available in the form.
I currently have a query that looks like this:
SELECT COUNT(*) as NumOfActivities, MIN(event_time) as MinDate, MAX(event_time) as MaxDate FROM activities WHERE account_id = $1 which creates a struct like this:
type GetActivityMetaDataForAccountRow struct{Numofactivities int64 Mindate interface{} Maxdate interface{} } but I would expect
type GetActivityMetaDataForAccountRow struct{Numofactivities int64 Mindate time.Time Maxdate time.Time } so it looks like after putting a date through an aggregate-function sqlc can no longer determine its type? but it seems only to be the case for datetimes as far as I can see it.
Relevant log output
No response
Database schema
CREATETABLEactivities ( account_id BIGINTNOT NULL, event_time TIMESTAMP WITH TIME ZONENOT NULL, );SQL queries
SELECTCOUNT(*) as NumOfActivities, MIN(event_time) as MinDate, MAX(event_time) as MaxDate FROM activities WHERE account_id = $1Configuration
No response
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
kolypto, sgielen, hareku, tadejsv, hendrikbursian and 1 more