C# Класс SqlFu.Builders.Expressions.ExpressionSqlGenerator

Наследование: System.Linq.Expressions.ExpressionVisitor, IGenerateSqlFromExpressions
Показать файл Открыть проект

Открытые методы

Метод Описание
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