-
Notifications
You must be signed in to change notification settings - Fork 213
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
bugfix: literalTime use t.UTC() , This behavior is different from the original sql.DB #106
Conversation
…me insert to database be changed and error
sql_dialect_test.go
Outdated
@@ -3,6 +3,7 @@ package goqu | |||
import ( | |||
"database/sql/driver" | |||
"fmt" | |||
"github.com/stretchr/testify/require" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File is not goimports
-ed (from goimports
)
"github.com/stretchr/testify/require" |
|
||
d.Literal(b.Clear(), &now) | ||
dts.assertNotPreparedSQL(t, b, "'"+now.Format(time.RFC3339Nano)+"'") | ||
d.Literal(b.Clear(), &now) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a reference for the variable on range scope now
(from scopelint
)
|
||
d.Literal(b.Clear(), &now) | ||
dts.assertPreparedSQL(t, b, "?", []interface{}{now}) | ||
d.Literal(b.Clear(), &now) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a reference for the variable on range scope now
(from scopelint
)
Codecov Report
@@ Coverage Diff @@
## master #106 +/- ##
=======================================
Coverage 86.35% 86.35%
=======================================
Files 38 38
Lines 2800 2800
=======================================
Hits 2418 2418
Misses 330 330
Partials 52 52
Continue to review full report at Codecov.
|
@chen56 I had to change how this worked. #163 Shed some light on where the strategy used in this PR breaks. After adding more integration tests the code it turns out this PR made some assumption on about the TZ that the db is running in. In both In order to support your use case I added a new method |
Take a look at 9e05f02 I added more documentation about working with timezones in `goqu. |
i like it |
bugfix: literalTime use t.UTC() , This behavior is different from the original sql.DB.
it change the origin location, so , time insert to database be changed and error