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:
parent
b72e98f60e
commit
8f5e437a61
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue