fix: correct nullable field detection logic in column metadata (#2520)

fix: correct nullable field detection logic in column metadata

gbase8s metadata: N  == NOT NULL

Co-authored-by: zhangyunfei <zhangyunfei@gbase.cn>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2520
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: maktub <maktub@noreply.gitea.com>
Co-committed-by: maktub <maktub@noreply.gitea.com>
This commit is contained in:
maktub 2025-07-21 18:24:41 +00:00 committed by Lunny Xiao
parent b72e98f60e
commit 8f5e437a61
1 changed files with 2 additions and 2 deletions

View File

@ -871,9 +871,9 @@ func (db *gbase8s) GetColumns(queryer core.Queryer, ctx context.Context, tableNa
} }
if nullable != nil && *nullable == "N" { if nullable != nil && *nullable == "N" {
col.Nullable = true
} else {
col.Nullable = false col.Nullable = false
} else {
col.Nullable = true
} }
if comment != nil { if comment != nil {
col.Comment = *comment col.Comment = *comment