refactor: dbms

This commit is contained in:
meilin.huang
2024-03-21 20:28:24 +08:00
parent b2cfd1517c
commit 4b3ed1310d
11 changed files with 34 additions and 33 deletions

View File

@@ -130,7 +130,7 @@ func (od *OracleMetaData) GetColumns(tableNames ...string) ([]dbi.Column, error)
ColumnName: cast.ToString(re["COLUMN_NAME"]),
DataType: dbi.ColumnDataType(cast.ToString(re["DATA_TYPE"])),
ColumnComment: cast.ToString(re["COLUMN_COMMENT"]),
Nullable: cast.ToString(re["NULLABLE"]),
Nullable: cast.ToString(re["NULLABLE"]) == "YES",
IsPrimaryKey: cast.ToInt(re["IS_PRIMARY_KEY"]) == 1,
IsIdentity: cast.ToInt(re["IS_IDENTITY"]) == 1,
ColumnDefault: defaultVal,
@@ -245,7 +245,7 @@ func (od *OracleMetaData) genColumnBasicSql(column dbi.Column) string {
}
nullAble := ""
if column.Nullable == "NO" {
if !column.Nullable {
nullAble = " NOT NULL"
}