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

enhance: Save operation support for mssql #3365

Merged
merged 14 commits into from
Apr 1, 2024
Prev Previous commit
Next Next commit
up
  • Loading branch information
oldme-git committed Mar 21, 2024
commit 9c1efb2ecf05d7c07259d856663142f987e06690
2 changes: 1 addition & 1 deletion contrib/drivers/mssql/mssql_do_insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (d *Driver) doSave(ctx context.Context,
for key, value := range one {
var saveValue string
if t, ok := value.(time.Time); ok {
saveValue = t.Format(`2006-01-02 15:04:05`)
saveValue = t.Format(time.RFC3339Nano)
} else {
saveValue = gconv.String(value)
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/drivers/mssql/mssql_z_unit_model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2604,7 +2604,7 @@ func Test_Model_Save(t *testing.T) {
user User
count int
result sql.Result
createTime = gtime.Now().Format("Y-m-d")
createTime = gtime.New("2024-10-01 12:01:01").Format("Y-m-d")
err error
)

Expand Down
Loading