mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 02:35:04 +08:00
-
This commit is contained in:
Binary file not shown.
@@ -9,36 +9,27 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class ExpressionContext : ExpResolveAccessory
|
public class ExpressionContext : ExpResolveAccessory
|
||||||
{
|
{
|
||||||
public ResolveExpressType Type { get; set; }
|
#region constructor
|
||||||
public Expression Expression { get; set; }
|
|
||||||
public StringBuilder SqlWhere { get; set; }
|
|
||||||
public virtual string SqlParameterKeyWord
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "@";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public virtual string GetaMppingColumnsName(string name)
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public bool IsSingle { get { return this.Type == ResolveExpressType.Single; } }
|
|
||||||
|
|
||||||
public ExpressionContext(Expression expression, ResolveExpressType type)
|
public ExpressionContext(Expression expression, ResolveExpressType type)
|
||||||
{
|
{
|
||||||
this.Type = type;
|
this.Type = type;
|
||||||
this.Expression = expression;
|
this.Expression = expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ToSqlString()
|
#endregion
|
||||||
{
|
|
||||||
BaseResolve resolve = new BaseResolve(new ExpressionParameter() { Expression = this.Expression, Context = this });
|
|
||||||
resolve.Start();
|
|
||||||
if (this.SqlWhere == null) return string.Empty;
|
|
||||||
return this.SqlWhere.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#region properties
|
||||||
|
public int Index { get; set; }
|
||||||
|
public ResolveExpressType Type { get; set; }
|
||||||
|
public Expression Expression { get; set; }
|
||||||
|
public StringBuilder SqlWhere { get; set; }
|
||||||
|
public bool IsSingle
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.Type == ResolveExpressType.Single;
|
||||||
|
}
|
||||||
|
}
|
||||||
public List<SugarParameter> Parameters
|
public List<SugarParameter> Parameters
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -50,7 +41,28 @@ namespace SqlSugar
|
|||||||
base._Parameters = value;
|
base._Parameters = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public virtual string SqlParameterKeyWord
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return "@";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
public int Index { get; set; }
|
#region functions
|
||||||
|
public virtual string GetaMppingColumnsName(string name)
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual string ToSqlString()
|
||||||
|
{
|
||||||
|
BaseResolve resolve = new BaseResolve(new ExpressionParameter() { Expression = this.Expression, Context = this });
|
||||||
|
resolve.Start();
|
||||||
|
if (this.SqlWhere == null) return string.Empty;
|
||||||
|
return this.SqlWhere.ToString();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user