C# 클래스 Hd.QueryExtensions.SqlExpression

파일 보기 프로젝트 열기: TargetProcess/Tp.HelpDesk 1 사용 예제들

공개 메소드들

메소드 설명
Constant ( SqlConstant val ) : SqlExpression

Creates a SqlExpression which represents a constant typed value.

Constant ( SqlDataType dataType, object val ) : SqlExpression

Creates a SqlExpression which represents a constant typed value

Date ( System.DateTime val ) : SqlExpression

Creates a SqlExpression which represents a date value.

Field ( Enum fieldName ) : SqlExpression
Field ( Enum firstPart, Enum secondPart, FromTerm table ) : SqlExpression
Field ( Enum fieldName, FromTerm table ) : SqlExpression
Field ( string fieldName ) : SqlExpression

Creates a SqlExpression which represents a field in a database table.

Field ( string fieldName, FromTerm table ) : SqlExpression

Creates a SqlExpression which represents a field in a database table.

Function ( SqlAggregationFunction func, SqlExpression param ) : SqlExpression

Creates a SqlExpression with an aggergation function

IfNull ( SqlExpression test, SqlExpression val ) : SqlExpression

Creates a SqlExpression with IfNull function.

Works as SQL Server's ISNULL() function.

LikeExpressionParameter ( ) : SqlExpression
LikeExpressionParameter ( Enum paramName ) : SqlExpression
LikeExpressionParameter ( string paramName ) : SqlExpression
Null ( ) : SqlExpression

Creates a SqlExpression representing a NULL value

Number ( double val ) : SqlExpression

Creates a SqlExpression which represents a numeric value.

Number ( int val ) : SqlExpression

Creates a SqlExpression which represents a numeric value.

Parameter ( ) : SqlExpression
Parameter ( string paramName ) : SqlExpression Correct parameter name depends on your specifc data provider. OLEDB expects all parameters to be '?' and matches parameters to values based on their index. SQL Server Native driver matches parameters by names and expects to find "@paramName" parameter placeholder in the query.
PseudoField ( string fieldName ) : SqlExpression
Raw ( string sql ) : SqlExpression

Creates a SqlExpression with raw SQL

String ( string val ) : SqlExpression

Creates a SqlExpression which represents a textual value.

SubQuery ( SelectQuery query ) : SqlExpression

Creates a SqlExpression which represents a subquery.

SubQuery ( string queryText ) : SqlExpression

Creates a SqlExpression which represents a subquery.

In many cases you can use an inner or outer JOIN instead of a subquery. If you prefer using subqueries it is recomended that you construct the subquery using another instance of SelectQuery, render it using the correct renderer and pass the resulting SQL statement to the queryText parameter.

비공개 메소드들

메소드 설명
SqlExpression ( ) : System

메소드 상세

Constant() 공개 정적인 메소드

Creates a SqlExpression which represents a constant typed value.
public static Constant ( SqlConstant val ) : SqlExpression
val SqlConstant SqlConstant instance
리턴 SqlExpression

Constant() 공개 정적인 메소드

Creates a SqlExpression which represents a constant typed value
public static Constant ( SqlDataType dataType, object val ) : SqlExpression
dataType SqlDataType Value's data type
val object The value
리턴 SqlExpression

Date() 공개 정적인 메소드

Creates a SqlExpression which represents a date value.
public static Date ( System.DateTime val ) : SqlExpression
val System.DateTime Value of the expression
리턴 SqlExpression

Field() 공개 정적인 메소드

public static Field ( Enum fieldName ) : SqlExpression
fieldName System.Enum
리턴 SqlExpression

Field() 공개 정적인 메소드

public static Field ( Enum firstPart, Enum secondPart, FromTerm table ) : SqlExpression
firstPart System.Enum
secondPart System.Enum
table FromTerm
리턴 SqlExpression

Field() 공개 정적인 메소드

public static Field ( Enum fieldName, FromTerm table ) : SqlExpression
fieldName System.Enum
table FromTerm
리턴 SqlExpression

Field() 공개 정적인 메소드

Creates a SqlExpression which represents a field in a database table.
public static Field ( string fieldName ) : SqlExpression
fieldName string Name of a field
리턴 SqlExpression

Field() 공개 정적인 메소드

Creates a SqlExpression which represents a field in a database table.
public static Field ( string fieldName, FromTerm table ) : SqlExpression
fieldName string Name of a field
table FromTerm The table this field belongs to
리턴 SqlExpression

Function() 공개 정적인 메소드

Creates a SqlExpression with an aggergation function
public static Function ( SqlAggregationFunction func, SqlExpression param ) : SqlExpression
func SqlAggregationFunction Aggregation function to be applied on the supplied expression
param SqlExpression Parameter of the aggregation function
리턴 SqlExpression

IfNull() 공개 정적인 메소드

Creates a SqlExpression with IfNull function.
Works as SQL Server's ISNULL() function.
public static IfNull ( SqlExpression test, SqlExpression val ) : SqlExpression
test SqlExpression Expression to be checked for being NULL
val SqlExpression Substitution
리턴 SqlExpression

LikeExpressionParameter() 공개 정적인 메소드

public static LikeExpressionParameter ( ) : SqlExpression
리턴 SqlExpression

LikeExpressionParameter() 공개 정적인 메소드

public static LikeExpressionParameter ( Enum paramName ) : SqlExpression
paramName System.Enum
리턴 SqlExpression

LikeExpressionParameter() 공개 정적인 메소드

public static LikeExpressionParameter ( string paramName ) : SqlExpression
paramName string
리턴 SqlExpression

Null() 공개 정적인 메소드

Creates a SqlExpression representing a NULL value
public static Null ( ) : SqlExpression
리턴 SqlExpression

Number() 공개 정적인 메소드

Creates a SqlExpression which represents a numeric value.
public static Number ( double val ) : SqlExpression
val double Value of the expression
리턴 SqlExpression

Number() 공개 정적인 메소드

Creates a SqlExpression which represents a numeric value.
public static Number ( int val ) : SqlExpression
val int Value of the expression
리턴 SqlExpression

Parameter() 공개 정적인 메소드

public static Parameter ( ) : SqlExpression
리턴 SqlExpression

Parameter() 공개 정적인 메소드

Correct parameter name depends on your specifc data provider. OLEDB expects all parameters to be '?' and matches parameters to values based on their index. SQL Server Native driver matches parameters by names and expects to find "@paramName" parameter placeholder in the query.
public static Parameter ( string paramName ) : SqlExpression
paramName string
리턴 SqlExpression

PseudoField() 공개 정적인 메소드

public static PseudoField ( string fieldName ) : SqlExpression
fieldName string
리턴 SqlExpression

Raw() 공개 정적인 메소드

Creates a SqlExpression with raw SQL
public static Raw ( string sql ) : SqlExpression
sql string
리턴 SqlExpression

String() 공개 정적인 메소드

Creates a SqlExpression which represents a textual value.
public static String ( string val ) : SqlExpression
val string Value of the expression
리턴 SqlExpression

SubQuery() 공개 정적인 메소드

Creates a SqlExpression which represents a subquery.
public static SubQuery ( SelectQuery query ) : SqlExpression
query SelectQuery A SelectQuery object
리턴 SqlExpression

SubQuery() 공개 정적인 메소드

Creates a SqlExpression which represents a subquery.
In many cases you can use an inner or outer JOIN instead of a subquery. If you prefer using subqueries it is recomended that you construct the subquery using another instance of SelectQuery, render it using the correct renderer and pass the resulting SQL statement to the queryText parameter.
public static SubQuery ( string queryText ) : SqlExpression
queryText string Text of the subquery.
리턴 SqlExpression