Skip to content

Commit

Permalink
fix(database/gdb): recognize field type tinyint(1) to golang type `…
Browse files Browse the repository at this point in the history
…bool` (#3921)
  • Loading branch information
gqcn authored Nov 13, 2024
1 parent 8c6db24 commit 6baf433
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions database/gdb/gdb_core_structure.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ func (c *Core) CheckLocalTypeForField(ctx context.Context, fieldType string, fie
if gstr.ContainsI(fieldType, "unsigned") {
return LocalTypeUint, nil
}
// field length is 1 means boolean.
if typePattern == "1" {
return LocalTypeBool, nil
}
return LocalTypeInt, nil

case
Expand Down

0 comments on commit 6baf433

Please sign in to comment.