Skip to content

Commit

Permalink
database/gdb/gdb_model_soft_time: fix soft-time support fieldType:`Lo…
Browse files Browse the repository at this point in the history
…calTypeUint64` in Insert/Update perations (#3551)
  • Loading branch information
muddydog authored Apr 29, 2024
1 parent 5b7cae7 commit 9aa426a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/gdb/gdb_model_soft_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (m *softTimeMaintainer) getConditionByFieldNameAndTypeForSoftDeleting(
switch fieldType {
case LocalTypeDate, LocalTypeDatetime:
return fmt.Sprintf(`%s IS NULL`, quotedFieldName)
case LocalTypeInt, LocalTypeUint, LocalTypeInt64, LocalTypeBool:
case LocalTypeInt, LocalTypeUint, LocalTypeInt64, LocalTypeUint64, LocalTypeBool:
return fmt.Sprintf(`%s=0`, quotedFieldName)
default:
intlog.Errorf(
Expand Down Expand Up @@ -372,7 +372,7 @@ func (m *softTimeMaintainer) GetValueByFieldTypeForCreateOrUpdate(
switch fieldType {
case LocalTypeDate, LocalTypeDatetime:
value = gtime.Now()
case LocalTypeInt, LocalTypeUint, LocalTypeInt64:
case LocalTypeInt, LocalTypeUint, LocalTypeInt64, LocalTypeUint64:
value = gtime.Timestamp()
case LocalTypeBool:
value = 1
Expand Down

0 comments on commit 9aa426a

Please sign in to comment.