-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.Get() #63
Comments
Hello! This is indeed a limitation in the current scany implementation. See this comment for more details: #33 (comment) type Row struct {
T time.Time
}
row := &Row{}
if err := pgxscan.Get(ctx, pgxConn, row, "select now() as t"); err != nil {
return nil, err
}
fmt.Println(row.T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have noticed that the
.Get()
method of Scany and Sqlx varies when you try to scan aselect now()
into avar t time.Time
.Scany.Get()
treats the&t
as a struct with missing fields, whilesqlx.Get()
does write the value into the variable. Is this "by design"? I noticed this when switching from Sqlx to Scany.The text was updated successfully, but these errors were encountered: