Synchronization code

This commit is contained in:
sunkaixuan
2022-11-29 02:03:02 +08:00
parent d83e6ce3c5
commit 2ac3c70055
2 changed files with 7 additions and 1 deletions

View File

@@ -968,6 +968,10 @@ namespace SqlSugar
{ {
return this.Select<TResult>(expression); return this.Select<TResult>(expression);
} }
if (this.QueryBuilder.TableShortName.IsNullOrEmpty())
{
this.QueryBuilder.TableShortName = clone.QueryBuilder.TableShortName;
}
this.QueryBuilder.Parameters = ps.Parameters; this.QueryBuilder.Parameters = ps.Parameters;
this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex; this.QueryBuilder.LambdaExpressions.ParameterIndex = clone.QueryBuilder.LambdaExpressions.ParameterIndex;
var parameters = (expression as LambdaExpression).Parameters; var parameters = (expression as LambdaExpression).Parameters;

View File

@@ -402,7 +402,7 @@ namespace SqlSugar
column.Length = row["numericprecision"].ObjToInt(); column.Length = row["numericprecision"].ObjToInt();
column.Scale = row["numericscale"].ObjToInt(); column.Scale = row["numericscale"].ObjToInt();
column.DecimalDigits = row["numericscale"].ObjToInt(); column.DecimalDigits = row["numericscale"].ObjToInt();
if (column.Length == 38 && column.Scale == 0) if (column.Length == 38 && column.Scale==0)
{ {
column.Length = 22; column.Length = 22;
} }
@@ -413,6 +413,7 @@ namespace SqlSugar
return result; return result;
} }
} }
private List<DbColumnInfo> GetOracleDbType(string tableName) private List<DbColumnInfo> GetOracleDbType(string tableName)
{ {
var sql0 = $@"select var sql0 = $@"select
@@ -449,6 +450,7 @@ namespace SqlSugar
var columns = this.Context.Ado.SqlQuery<DbColumnInfo>(sql0); var columns = this.Context.Ado.SqlQuery<DbColumnInfo>(sql0);
return columns; return columns;
} }
private List<string> GetPrimaryKeyByTableNames(string tableName) private List<string> GetPrimaryKeyByTableNames(string tableName)
{ {
string cacheKey = "DbMaintenanceProvider.GetPrimaryKeyByTableNames." + this.SqlBuilder.GetNoTranslationColumnName(tableName).ToLower(); string cacheKey = "DbMaintenanceProvider.GetPrimaryKeyByTableNames." + this.SqlBuilder.GetNoTranslationColumnName(tableName).ToLower();