-
Notifications
You must be signed in to change notification settings - Fork 372
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
Fix datetime field scan error into dummy with "parseTime=true" (Scan pai... #218
Conversation
…pair: time.Time -> *sql.RawBytes)
I think you shouldn't select a field if it's not going to be scanned into your struct. |
Sometimes easier to SELECT * (if we must select a lot of fields, except several) |
I'm adding tests about time, also added a parseTime=true run in the automated testing for mysql. #226 |
I'm not sure we should ignore unused values. There is an issue about generating a select statement with just the fields you need. See #133. Using |
a9f5c20
to
361a068
Compare
Cherry pick correct commit for PR #218
Merged through #277 |
"sql: Scan error on column index 13: unsupported driver -> Scan pair: time.Time -> *sql.RawBytes"" occurs when datetime fields doesn't exists in struct, but exists in DB-table and i have "?loc=Local&parseTime=true" additional connection params.
So i add custom struct for dummy fields, that implements Scanner interface