Skip to content
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

Question: TimeField and sql.NullTime #5

Closed
mrg0lden opened this issue Jul 3, 2021 · 3 comments
Closed

Question: TimeField and sql.NullTime #5

mrg0lden opened this issue Jul 3, 2021 · 3 comments

Comments

@mrg0lden
Copy link

mrg0lden commented Jul 3, 2021

Does a TimeField accept an sql.NullTime value on its AssignmentField TimeField.Set ?

@bokwoon95
Copy link
Owner

It should, TimeField.Set will pass whatever argument it gets (in this case an sql.NullTime) as-is to the underlying database/sql driver. So it's no different from e.g. db.Exec("UPDATE tbl SET field = ?", sql.NullTime{...})

@mrg0lden
Copy link
Author

mrg0lden commented Jul 4, 2021

Thanks, that answers my questions.

P.S. any first peeks on sq2? ;) or is it still a very early WIP?

@mrg0lden mrg0lden closed this as completed Jul 4, 2021
@bokwoon95
Copy link
Owner

heh, the design of sq2 is still in flux. At any rate it will release after the introduction of generics so that I can implement the ideas in #2. Also I'm adding a new ddl package to sq that generates DDL from the table structs (addressing #1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants