C# Class SqlSugar.ResolveExpress

** 描述:拉姆达解析类 ** 创始时间:2015-7-20 ** 修改时间:- ** 作者:sunkaixuan ** qq:610262374 ** 使用说明:使用请注名作者
ファイルを表示 Open project: sunkaixuan/SqlSugar Class Usage Examples

Public Properties

Property Type Description
ConstantBoolDictionary List
ExpErrorUniqueKey object
Paras List
SqlWhere string
Type ResolveExpressType

Public Methods

Method Description
GetExpressionRightField ( Expression exp, SqlSugarClient db ) : string

获取拉姆达表达式的字段值

GetExpressionRightFieldByNT ( Expression exp, SqlSugarClient db ) : string

获取拉姆达表达式的字段值多个T模式

ResolveExpress ( int sameIndex = 1 ) : System

解析拉姆达

ResolveExpression ( ResolveExpress re, Expression exp, SqlSugarClient db ) : void

解析表达式

Private Methods

Method Description
AddParas ( string &left, object right ) : string

添加参数

AddParasReturnRight ( object left, string &right ) : string

添加参数并返回右边值

BinaryExpression ( Expression exp ) : string
ConstantExpression ( Expression exp, MemberType &type, bool isComparisonOperator ) : string
Contains ( string methodName, MethodCallExpression mce, bool isTure ) : string

拉姆达Contains函数处理

CreateSqlElements ( Expression exp, MemberType &type, bool isTure, bool isComparisonOperator = null ) : string

递归解析表达式路由计算

EndWith ( string methodName, MethodCallExpression mce, bool isTure ) : string

拉姆达EndWith函数处理

Equals ( string methodName, MethodCallExpression mce ) : string

是否相等

GetMemberValue ( Expression &exp, MemberExpression me, object &dynInv ) : void
GetOperator ( ExpressionType expressiontype ) : string

根据条件生成对应的sql查询操作符

GetProMethod ( string methodName, string value, bool isField ) : string
Init ( ResolveExpress re, Expression exp ) : void

初始化表达式

IsNullOrEmpty ( string methodName, MethodCallExpression mce, bool isTure ) : string

非空验证

LambdaExpression ( Expression exp ) : string
MemberExpression ( Expression &exp, MemberType &type, bool isComparisonOperator ) : string
MethodCallExpression ( Expression exp, MemberType &type, bool isTure ) : string
MethodToString ( string methodName, MethodCallExpression mce, MemberType &type ) : string

拉姆达ToString函数处理

ParMethodTo ( string methodName, MethodCallExpression mce, MemberType &type ) : string

参数函数

ProLength ( string value, bool isField ) : string
SetMemberValueToDynInv ( Expression &exp, MemberExpression me, object &dynInv ) : void

将解析值赋给dynInv

StartsWith ( string methodName, MethodCallExpression mce, bool isTure ) : string

拉姆达StartsWith函数处理

UnaryExpression ( Expression exp, MemberType &type ) : string
UnderNodeTypeIsConstantExpression ( MemberExpression exp ) : bool

Method Details

GetExpressionRightField() public method

获取拉姆达表达式的字段值
public GetExpressionRightField ( Expression exp, SqlSugarClient db ) : string
exp System.Linq.Expressions.Expression
db SqlSugarClient 数据库访问对象
return string

GetExpressionRightFieldByNT() public method

获取拉姆达表达式的字段值多个T模式
public GetExpressionRightFieldByNT ( Expression exp, SqlSugarClient db ) : string
exp System.Linq.Expressions.Expression
db SqlSugarClient 数据库访问对象
return string

ResolveExpress() public method

解析拉姆达
public ResolveExpress ( int sameIndex = 1 ) : System
sameIndex int 区分相同参数名的索引号
return System

ResolveExpression() public method

解析表达式
public ResolveExpression ( ResolveExpress re, Expression exp, SqlSugarClient db ) : void
re ResolveExpress 当前解析对象
exp System.Linq.Expressions.Expression 要解析的表达式
db SqlSugarClient 数据库访问对象
return void

Property Details

ConstantBoolDictionary public_oe static_oe property

解析bool类型用到的字典
public static List ConstantBoolDictionary
return List

ExpErrorUniqueKey public_oe static_oe property

拉姆达解析唯一标识
public static object ExpErrorUniqueKey
return object

Paras public_oe property

public List Paras
return List

SqlWhere public_oe property

public string SqlWhere
return string

Type public_oe property

public ResolveExpressType Type
return ResolveExpressType