Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Nov 8, 2023
1 parent acad8b0 commit 363e49a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sqlxx/batch/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ func buildInsertQueryValues[T any](dialect string, mapper *reflectx.Mapper, colu
case "updated_at":
field.Set(reflect.ValueOf(now))
case "id":
if field.Interface().(uuid.UUID) != uuid.Nil {
if value, ok := field.Interface().(uuid.UUID); ok && value != uuid.Nil {
break // breaks switch, not for
} else if value, ok := field.Interface().(string); ok && len(value) > 0 {
break // breaks switch, not for
} else if dialect == dbal.DriverCockroachDB {
// This is a special case:
Expand Down

0 comments on commit 363e49a

Please sign in to comment.