- Notifications
You must be signed in to change notification settings - Fork976
Nullable types for computed columns?#1030
Unanswered
gabrielhora asked this question inQ&A
-
Hi there, I'm trying to come up with a solution for having nullable types for computed columns. This is a simple example, consttest=`-- name: Test :oneselect min(age)::int as min_age, max(age)::int as max_age from my_table`typeTestRowstruct {MinAgeint32MaxAgeint32}func (q*Queries)Test(ctx context.Context) (TestRow,error) {row:=q.db.QueryRowContext(ctx,test)variTestRowerr:=row.Scan(&i.MinAge,&i.MaxAge)returni,err} Thanks a lot for your time. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 10
Replies: 1 comment
-
no response? may i know why? |
BetaWas this translation helpful?Give feedback.
All reactions
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment