C# 클래스 SqlFu.Builders.Expressions.ExpressionSqlGenerator

상속: System.Linq.Expressions.ExpressionVisitor, IGenerateSqlFromExpressions
파일 보기 프로젝트 열기: sapiens/SqlFu

공개 메소드들

메소드 설명
ExpressionSqlGenerator ( IDbProviderExpressions provider, ITableInfoFactory factory, IEscapeIdentifier escape, ParametersManager param = null ) : System
GetColumnsSql ( ) : string

Only to generate "select columns"

GetSql ( Expression expression ) : string

For everything except "select columns"

ToString ( ) : string

보호된 메소드들

메소드 설명
VisitBinary ( BinaryExpression node ) : Expression
VisitConstant ( ConstantExpression node ) : Expression
VisitMember ( MemberExpression node ) : Expression

This is called only in criterias. It shouldn't be called when in generating columns

VisitMemberInit ( MemberInitExpression node ) : Expression
VisitMethodCall ( MethodCallExpression node ) : Expression
VisitNew ( NewExpression node ) : Expression
VisitUnary ( UnaryExpression node ) : Expression

비공개 메소드들

메소드 설명
GetColumnName ( MemberExpression member ) : string
GetColumnName ( MemberInfo column ) : string
GetColumnName ( UnaryExpression member ) : string
HandleAnonymous ( NewExpression node ) : void
HandleContains ( MethodCallExpression meth ) : void
HandleDateTimeProperties ( MemberExpression node ) : void
HandleInject ( MethodCallExpression node ) : void
HandleObject ( NewExpression node ) : int

Returns how many columns were written

HandleParamStringFunctions ( MethodCallExpression node ) : void
HandleParameter ( MemberExpression node ) : void
HandleParameter ( MethodCallExpression node ) : void
HandleParameterSubProperty ( MemberExpression node ) : void

For properties of a parameter property. Used to for properties that can be translated into db functions

HandleSingleBooleanConstant ( ConstantExpression node ) : void
HandleSingleBooleanProperty ( MemberExpression node, bool b ) : void
HandleStringProperties ( MemberExpression node ) : void
IsLambdaBooleanConstantHandled ( LambdaExpression expression ) : bool
IsSingleBooleanConstant ( ConstantExpression node ) : bool
IsSingleBooleanProperty ( Expression node ) : bool
VisitProjection ( NewExpression node ) : void
WriteParameter ( Expression node ) : void

메소드 상세

ExpressionSqlGenerator() 공개 메소드

public ExpressionSqlGenerator ( IDbProviderExpressions provider, ITableInfoFactory factory, IEscapeIdentifier escape, ParametersManager param = null ) : System
provider IDbProviderExpressions
factory ITableInfoFactory
escape IEscapeIdentifier
param ParametersManager
리턴 System

GetColumnsSql() 공개 메소드

Only to generate "select columns"
public GetColumnsSql ( ) : string
리턴 string

GetSql() 공개 메소드

For everything except "select columns"
public GetSql ( Expression expression ) : string
expression System.Linq.Expressions.Expression
리턴 string

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

VisitBinary() 보호된 메소드

protected VisitBinary ( BinaryExpression node ) : Expression
node System.Linq.Expressions.BinaryExpression
리턴 System.Linq.Expressions.Expression

VisitConstant() 보호된 메소드

protected VisitConstant ( ConstantExpression node ) : Expression
node System.Linq.Expressions.ConstantExpression
리턴 System.Linq.Expressions.Expression

VisitMember() 보호된 메소드

This is called only in criterias. It shouldn't be called when in generating columns
protected VisitMember ( MemberExpression node ) : Expression
node System.Linq.Expressions.MemberExpression
리턴 System.Linq.Expressions.Expression

VisitMemberInit() 보호된 메소드

protected VisitMemberInit ( MemberInitExpression node ) : Expression
node System.Linq.Expressions.MemberInitExpression
리턴 System.Linq.Expressions.Expression

VisitMethodCall() 보호된 메소드

protected VisitMethodCall ( MethodCallExpression node ) : Expression
node System.Linq.Expressions.MethodCallExpression
리턴 System.Linq.Expressions.Expression

VisitNew() 보호된 메소드

protected VisitNew ( NewExpression node ) : Expression
node System.Linq.Expressions.NewExpression
리턴 System.Linq.Expressions.Expression

VisitUnary() 보호된 메소드

protected VisitUnary ( UnaryExpression node ) : Expression
node System.Linq.Expressions.UnaryExpression
리턴 System.Linq.Expressions.Expression