mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update core
This commit is contained in:
@@ -238,6 +238,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
resolveExpress.PgSqlIsAutoToLower = true;
|
resolveExpress.PgSqlIsAutoToLower = true;
|
||||||
}
|
}
|
||||||
|
resolveExpress.RootExpression = expression;
|
||||||
resolveExpress.JoinQueryInfos = Builder.QueryBuilder.JoinQueryInfos;
|
resolveExpress.JoinQueryInfos = Builder.QueryBuilder.JoinQueryInfos;
|
||||||
resolveExpress.IsSingle = IsSingle();
|
resolveExpress.IsSingle = IsSingle();
|
||||||
resolveExpress.MappingColumns = Context.MappingColumns;
|
resolveExpress.MappingColumns = Context.MappingColumns;
|
||||||
|
@@ -45,6 +45,7 @@ namespace SqlSugar
|
|||||||
public IgnoreColumnList IgnoreComumnList { get; set; }
|
public IgnoreColumnList IgnoreComumnList { get; set; }
|
||||||
public bool PgSqlIsAutoToLower { get; set; }
|
public bool PgSqlIsAutoToLower { get; set; }
|
||||||
public List<SqlFuncExternal> SqlFuncServices { get; set; }
|
public List<SqlFuncExternal> SqlFuncServices { get; set; }
|
||||||
|
public Expression RootExpression { get; set; }
|
||||||
public bool IsSingle
|
public bool IsSingle
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -129,6 +130,7 @@ namespace SqlSugar
|
|||||||
copyContext.ParameterIndex = this.ParameterIndex;
|
copyContext.ParameterIndex = this.ParameterIndex;
|
||||||
copyContext.PgSqlIsAutoToLower = this.PgSqlIsAutoToLower;
|
copyContext.PgSqlIsAutoToLower = this.PgSqlIsAutoToLower;
|
||||||
copyContext.IsSingle = this.IsSingle;
|
copyContext.IsSingle = this.IsSingle;
|
||||||
|
copyContext.RootExpression = this.RootExpression;
|
||||||
return copyContext;
|
return copyContext;
|
||||||
}
|
}
|
||||||
public ExpressionContext GetCopyContextWithMapping()
|
public ExpressionContext GetCopyContextWithMapping()
|
||||||
@@ -144,6 +146,7 @@ namespace SqlSugar
|
|||||||
copyContext.RefreshMapping = this.RefreshMapping;
|
copyContext.RefreshMapping = this.RefreshMapping;
|
||||||
copyContext.PgSqlIsAutoToLower = this.PgSqlIsAutoToLower;
|
copyContext.PgSqlIsAutoToLower = this.PgSqlIsAutoToLower;
|
||||||
copyContext.IsSingle = this.IsSingle;
|
copyContext.IsSingle = this.IsSingle;
|
||||||
|
copyContext.RootExpression = this.RootExpression;
|
||||||
return copyContext;
|
return copyContext;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@@ -63,6 +63,11 @@ namespace SqlSugar
|
|||||||
context.SingleTableNameSubqueryShortName = (((meExp.Body as BinaryExpression).Right as MemberExpression).Expression as ParameterExpression).Name;
|
context.SingleTableNameSubqueryShortName = (((meExp.Body as BinaryExpression).Right as MemberExpression).Expression as ParameterExpression).Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (context.RootExpression!=null&&context.Expression.GetType().Name == "SimpleBinaryExpression")
|
||||||
|
{
|
||||||
|
var name = (this.context.RootExpression as LambdaExpression).Parameters[0].Name;
|
||||||
|
context.SingleTableNameSubqueryShortName = name;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Check.Exception(true, "I'm sorry I can't parse the current expression");
|
Check.Exception(true, "I'm sorry I can't parse the current expression");
|
||||||
|
@@ -27,6 +27,7 @@ namespace SqlSugar
|
|||||||
Action<Type> InitMappingInfo { get; set; }
|
Action<Type> InitMappingInfo { get; set; }
|
||||||
Action RefreshMapping { get; set; }
|
Action RefreshMapping { get; set; }
|
||||||
bool PgSqlIsAutoToLower { get; set; }
|
bool PgSqlIsAutoToLower { get; set; }
|
||||||
|
Expression RootExpression { get; set; }
|
||||||
|
|
||||||
string GetAsString(string fieldName, string fieldValue);
|
string GetAsString(string fieldName, string fieldValue);
|
||||||
void Resolve(Expression expression, ResolveExpressType resolveType);
|
void Resolve(Expression expression, ResolveExpressType resolveType);
|
||||||
|
@@ -392,6 +392,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
public override List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
|
||||||
|
{
|
||||||
|
tableName = SqlBuilder.GetNoTranslationColumnName(tableName);
|
||||||
|
var result= base.GetColumnInfosByTableName(tableName, isCache);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
public override bool RenameColumn(string tableName, string oldColumnName, string newColumnName)
|
public override bool RenameColumn(string tableName, string oldColumnName, string newColumnName)
|
||||||
{
|
{
|
||||||
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
||||||
|
Reference in New Issue
Block a user