Compare commits

...

2 Commits

Author SHA1 Message Date
b69a082bb1 v0.0.376
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m22s
2024-01-14 01:52:52 +01:00
a4a8c83d17 v0.0.375
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m25s
2024-01-14 01:50:48 +01:00
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
package goext package goext
const GoextVersion = "0.0.374" const GoextVersion = "0.0.376"
const GoextVersionTimestamp = "2024-01-14T01:37:38+0100" const GoextVersionTimestamp = "2024-01-14T01:52:52+0100"

View File

@@ -96,7 +96,7 @@ func BuildInsertStatement(q Queryable, tableName string, obj any) (string, PP, e
if rsfield.Type.Kind() == reflect.Ptr && rvfield.IsNil() { if rsfield.Type.Kind() == reflect.Ptr && rvfield.IsNil() {
fields = append(fields, columnName) fields = append(fields, columnName)
values = append(fields, "NULL") values = append(values, "NULL")
} else { } else {
@@ -106,7 +106,7 @@ func BuildInsertStatement(q Queryable, tableName string, obj any) (string, PP, e
} }
fields = append(fields, columnName) fields = append(fields, columnName)
values = append(fields, ":"+params.Add(val)) values = append(values, ":"+params.Add(val))
} }
} }
@@ -116,5 +116,5 @@ func BuildInsertStatement(q Queryable, tableName string, obj any) (string, PP, e
} }
//goland:noinspection SqlNoDataSourceInspection //goland:noinspection SqlNoDataSourceInspection
return fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s)", tableName, strings.Join(fields, ", "), values), params, nil return fmt.Sprintf("INSERT INTO %s (%s) VALUES (%s)", tableName, strings.Join(fields, ", "), strings.Join(values, ", ")), params, nil
} }