达梦 DbFirst

This commit is contained in:
sunkaixuan 2024-06-26 16:59:21 +08:00
parent feed5c4c85
commit 3ef837a91a
3 changed files with 9 additions and 3 deletions

View File

@ -570,6 +570,10 @@ namespace SqlSugar
return "null";
}
string result = this.Context.Ado.DbBind.GetConvertString(item.DataType) + "(\"" + convertString + "\")";
if (this.SqlBuilder.SqlParameterKeyWord == ":"&&!string.IsNullOrEmpty(item.OracleDataType))
{
result = this.Context.Ado.DbBind.GetConvertString(item.OracleDataType) + "(\"" + convertString + "\")";
}
return result;
}
private string GetPropertyDescriptionText(DbColumnInfo item, string propertyDescriptionText)

View File

@ -482,7 +482,8 @@ WHERE table_name = '" + tableName + "'");
var current = columns.FirstOrDefault(it => it.DbColumnName.EqualCase(column.DbColumnName));
if (current != null)
{
column.OracleDataType = current.DataType;
column.OracleDataType = current.DataType;
column.DefaultValue = current.DefaultValue?.TrimStart('\'')?.TrimEnd('\'');
}
result.Add(column);
}
@ -503,7 +504,8 @@ WHERE table_name = '" + tableName + "'");
t1.char_length,
t1.data_precision,
t1.data_scale,
t1.nullable,
t1.nullable,
t1.data_default as DefaultValue,
t4.index_name,
t4.column_position,
t4.descend

View File

@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.4.160-preview07</version>
<version>5.1.4.160-preview08</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>