Update dm

This commit is contained in:
sunkaixuan
2022-12-11 19:50:19 +08:00
parent 9477fbe7c2
commit 37641a0686
3 changed files with 17 additions and 4 deletions

View File

@@ -462,7 +462,7 @@ namespace SqlSugar
//string primaryKeyInfo = null;
if (columns.Any(it => it.IsPrimarykey) && isCreatePrimaryKey)
{
sql= sql.TrimEnd(')')+ string.Format(", Primary key({0})", string.Join(",", columns.Where(it => it.IsPrimarykey).Select(it => this.SqlBuilder.GetTranslationColumnName(it.DbColumnName.ToLower()))));
sql= sql.TrimEnd(')')+ string.Format(", Primary key({0})", string.Join(",", columns.Where(it => it.IsPrimarykey).Select(it => this.SqlBuilder.GetTranslationColumnName(it.DbColumnName.ToUpper(IsUppper)))));
sql = sql + ")";
}
//sql = sql.Replace("$PrimaryKey", primaryKeyInfo);

View File

@@ -47,7 +47,7 @@ namespace SqlSugar
}
else
{
return this.Context.CurrentConnectionConfig.MoreSettings.IsAutoToUpper == true;
return this.SugarContext?.Context?.Context?.CurrentConnectionConfig?.MoreSettings.IsAutoToUpper == true;
}
}
}

View File

@@ -37,9 +37,22 @@ namespace SqlSugar
private string GetOracleUpdateColums(int i, DbColumnInfo m)
{
return string.Format("\"{0}\"={1}", m.DbColumnName.ToUpper(), FormatValue(i, m.DbColumnName, m.Value));
return string.Format("\"{0}\"={1}", m.DbColumnName.ToUpper(IsUppper), FormatValue(i, m.DbColumnName, m.Value));
}
public bool IsUppper
{
get
{
if (this.Context.CurrentConnectionConfig.MoreSettings == null)
{
return true;
}
else
{
return this.Context.CurrentConnectionConfig.MoreSettings.IsAutoToUpper == true;
}
}
}
public object FormatValue(int i, string name, object value)
{
if (value == null)