C# Класс Tiraggo.DynamicQuery.tgQueryItem

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
As ( string alias ) : tgQueryItem

Privides the Ability to Alias a column name

Avg ( ) : tgQueryItem

Aggregate Avg. See tgQuerySubOperatorType Enumeration.

Between ( object start, object end ) : tgComparison

Comparison ensuring that this column is BETWEEN two values. See tgComparisonOperand Enumeration.

Case ( ) : tgCase
Cast ( tgCastType castType ) : tgQueryItem

Cast informs the DataProviders that a SQL CAST operation is needed.

In C# you can cast with the overloaded cast operators, like this: (tgString)query.Age

Cast ( tgCastType castType, int length ) : tgQueryItem

Cast informs the DataProviders that a SQL CAST operation is needed. This overloaded version of Cast is useful for Casting variable length character columns

In C# you can cast with the overloaded cast operators, like this: (tgString)query.Age

Cast ( tgCastType castType, int precision, int scale ) : tgQueryItem

Cast informs the DataProviders that a SQL CAST operation is needed. This overloaded version of Cast is useful for Casting decimal types

In C# you can cast with the overloaded cast operators, like this: (tgString)query.Age

Coalesce ( string expresssions ) : tgQueryItem

This can be used to return the first non null parameter.

The code below will return "Smith" is the LastName column in the database is null. MyCollection coll = new MyCollection(); coll.Query.Select(coll.Query.LastName.Coalesce("'Smith'")); coll.Query.Load();

Contains ( object value ) : tgComparison

Contains is used to search columns containing character-based data types for precise or fuzzy (less precise) matches to single words and phrases. The column must have a Full Text index.

See CONTAINS in the SQL server MSDN docs for a full explanation of supported search terms and how to enable Full Text searching at the database, table, and column levels.

Count ( ) : tgQueryItem

Aggregate Count. See tgQuerySubOperatorType Enumeration.

Date ( ) : tgQueryItem

Returns the Date only portion of a date columm

DatePart ( string datePart ) : tgQueryItem

Returns a particular date part of a date column

Distinct ( ) : tgQueryItem

Set to true for (DISTINCT columnName).

GetHashCode ( ) : int

Required due to operator overloading.

In ( ) : tgComparison

Comparison ensuring that this column is IN a list of values. See tgComparisonOperand Enumeration.

In ( tgDynamicQuerySerializable subQuery ) : tgComparison

Comparison ensuring that this column is IN a list of values.

IsNotNull ( ) : tgComparison

Comparison ensuring that this column is NOT NULL. See tgComparisonOperand Enumeration.

IsNull ( ) : tgComparison

Comparison ensuring that this column is NULL. See tgComparisonOperand Enumeration.

LTrim ( ) : tgQueryItem

Performs a Left Trim (remove blanks) on the column

Length ( ) : tgQueryItem

Returns the length of a character based column

Like ( object value ) : tgComparison

Comparison ensuring that the value passed in is LIKE this column. See tgComparisonOperand Enumeration.

Like ( object value, char escapeCharacter ) : tgComparison

Comparison ensuring that the value passed in is LIKE this column. This overload takes a single escape character. See tgComparisonOperand Enumeration.

Max ( ) : tgQueryItem

Aggregate Max. See tgQuerySubOperatorType Enumeration.

Min ( ) : tgQueryItem

Aggregate Min. See tgQuerySubOperatorType Enumeration.

NotIn ( ) : tgComparison

Comparison ensuring that this column is NOT IN a list of values. See tgComparisonOperand Enumeration.

NotIn ( tgDynamicQuerySerializable subQuery ) : tgComparison

Comparison ensuring that this column is NOT IN a list of values.

NotLike ( object value ) : tgComparison

Comparison ensuring that the value passed in is NOT LIKE this column. See tgComparisonOperand Enumeration.

NotLike ( object value, char escapeCharacter ) : tgComparison

Comparison ensuring that the value passed in is NOT LIKE this column. This overload takes a single escape character. See tgComparisonOperand Enumeration.

OP ( tgComparisonOperand op ) : tgComparison

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.

OP ( tgComparisonOperand op, object value ) : tgComparison

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.

OP ( tgComparisonOperand op, object value1, object value2 ) : tgComparison

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.

RTrim ( ) : tgQueryItem

Performs a Right Trim (remove blanks) on the column

Round ( int significantDigits ) : tgQueryItem

Performs a round on the column

StdDev ( ) : tgQueryItem

Aggregate StdDev. See tgQuerySubOperatorType Enumeration.

Substring ( System length ) : tgQueryItem

Returns a portion of the string column

Substring ( System start, System length ) : tgQueryItem

Returns a portion of the string column

Substring ( int length ) : tgQueryItem

Returns a portion of the string column

Substring ( int start, int length ) : tgQueryItem

Returns a portion of the string column

Sum ( ) : tgQueryItem

Aggregate Sum. See tgQuerySubOperatorType Enumeration.

ToLower ( ) : tgQueryItem

Returns the column in LOWER CASE

ToString ( ) : string

ToString() (to use in GroupBy/OrderBy and such ....)

ToUpper ( ) : tgQueryItem

Returns the column in UPPER CASE

Trim ( ) : tgQueryItem

Removes blanks from the beginning and end of the column

Var ( ) : tgQueryItem

Aggregate Var. See tgQuerySubOperatorType Enumeration.

operator ( ) : tgComparison
operator ( ) : tgQueryItem
tgQueryItem ( tgDynamicQuerySerializable query, string columnName, tgSystemType datatype ) : System

The tgQueryItem class is dynamically created by your BusinessEntity's DynamicQuery mechanism.

Приватные методы

Метод Описание
AddOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgQueryItem
AddSubOperator ( tgQuerySubOperator subOperator ) : void
CreateComparisonParameter ( tgComparisonOperand operand ) : tgComparison
CreateComparisonParameter ( tgComparisonOperand operand, object value ) : tgComparison
DivideOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgQueryItem
Equal ( object value ) : tgComparison
EqualOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgComparison
Equals ( object o ) : bool
GreaterThan ( object value ) : tgComparison
GreaterThan ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgComparison
GreaterThanOrEqual ( object value ) : tgComparison
GreaterThanOrEqual ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgComparison
LessThan ( object value ) : tgComparison
LessThan ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgComparison
LessThanOrEqual ( object value ) : tgComparison
LessThanOrEqual ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgComparison
ModuloOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgQueryItem
MultiplyOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgQueryItem
NotEqual ( object value ) : tgComparison
NotEqualOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgComparison
SubtractOperator ( tgQueryItem queryItem, object literal, tgSystemType literalType, bool itemFirst ) : tgQueryItem
tgQueryItem ( ) : System

Описание методов

As() публичный Метод

Privides the Ability to Alias a column name
public As ( string alias ) : tgQueryItem
alias string The Alias Name
Результат tgQueryItem

Avg() публичный Метод

Aggregate Avg. See tgQuerySubOperatorType Enumeration.
public Avg ( ) : tgQueryItem
Результат tgQueryItem

Between() публичный Метод

Comparison ensuring that this column is BETWEEN two values. See tgComparisonOperand Enumeration.
public Between ( object start, object end ) : tgComparison
start object The starting value for comparison.
end object The ending value for comparison.
Результат tgComparison

Case() публичный Метод

public Case ( ) : tgCase
Результат tgCase

Cast() публичный Метод

Cast informs the DataProviders that a SQL CAST operation is needed.
In C# you can cast with the overloaded cast operators, like this: (tgString)query.Age
public Cast ( tgCastType castType ) : tgQueryItem
castType tgCastType The type of cast needed
Результат tgQueryItem

Cast() публичный Метод

Cast informs the DataProviders that a SQL CAST operation is needed. This overloaded version of Cast is useful for Casting variable length character columns
In C# you can cast with the overloaded cast operators, like this: (tgString)query.Age
public Cast ( tgCastType castType, int length ) : tgQueryItem
castType tgCastType The type of cast needed
length int
Результат tgQueryItem

Cast() публичный Метод

Cast informs the DataProviders that a SQL CAST operation is needed. This overloaded version of Cast is useful for Casting decimal types
In C# you can cast with the overloaded cast operators, like this: (tgString)query.Age
public Cast ( tgCastType castType, int precision, int scale ) : tgQueryItem
castType tgCastType The type of cast needed
precision int
scale int
Результат tgQueryItem

Coalesce() публичный Метод

This can be used to return the first non null parameter.
The code below will return "Smith" is the LastName column in the database is null. MyCollection coll = new MyCollection(); coll.Query.Select(coll.Query.LastName.Coalesce("'Smith'")); coll.Query.Load();
public Coalesce ( string expresssions ) : tgQueryItem
expresssions string The value to return if null
Результат tgQueryItem

Contains() публичный Метод

Contains is used to search columns containing character-based data types for precise or fuzzy (less precise) matches to single words and phrases. The column must have a Full Text index.
See CONTAINS in the SQL server MSDN docs for a full explanation of supported search terms and how to enable Full Text searching at the database, table, and column levels.
public Contains ( object value ) : tgComparison
value object The value for comparison.
Результат tgComparison

Count() публичный Метод

Aggregate Count. See tgQuerySubOperatorType Enumeration.
public Count ( ) : tgQueryItem
Результат tgQueryItem

Date() публичный Метод

Returns the Date only portion of a date columm
public Date ( ) : tgQueryItem
Результат tgQueryItem

DatePart() публичный Метод

Returns a particular date part of a date column
public DatePart ( string datePart ) : tgQueryItem
datePart string
Результат tgQueryItem

Distinct() публичный Метод

Set to true for (DISTINCT columnName).
public Distinct ( ) : tgQueryItem
Результат tgQueryItem

GetHashCode() публичный Метод

Required due to operator overloading.
public GetHashCode ( ) : int
Результат int

In() публичный Метод

Comparison ensuring that this column is IN a list of values. See tgComparisonOperand Enumeration.
public In ( ) : tgComparison
Результат tgComparison

In() публичный Метод

Comparison ensuring that this column is IN a list of values.
public In ( tgDynamicQuerySerializable subQuery ) : tgComparison
subQuery tgDynamicQuerySerializable
Результат tgComparison

IsNotNull() публичный Метод

Comparison ensuring that this column is NOT NULL. See tgComparisonOperand Enumeration.
public IsNotNull ( ) : tgComparison
Результат tgComparison

IsNull() публичный Метод

Comparison ensuring that this column is NULL. See tgComparisonOperand Enumeration.
public IsNull ( ) : tgComparison
Результат tgComparison

LTrim() публичный Метод

Performs a Left Trim (remove blanks) on the column
public LTrim ( ) : tgQueryItem
Результат tgQueryItem

Length() публичный Метод

Returns the length of a character based column
public Length ( ) : tgQueryItem
Результат tgQueryItem

Like() публичный Метод

Comparison ensuring that the value passed in is LIKE this column. See tgComparisonOperand Enumeration.
public Like ( object value ) : tgComparison
value object The value for comparison.
Результат tgComparison

Like() публичный Метод

Comparison ensuring that the value passed in is LIKE this column. This overload takes a single escape character. See tgComparisonOperand Enumeration.
public Like ( object value, char escapeCharacter ) : tgComparison
value object The value for comparison.
escapeCharacter char The single escape character.
Результат tgComparison

Max() публичный Метод

Aggregate Max. See tgQuerySubOperatorType Enumeration.
public Max ( ) : tgQueryItem
Результат tgQueryItem

Min() публичный Метод

Aggregate Min. See tgQuerySubOperatorType Enumeration.
public Min ( ) : tgQueryItem
Результат tgQueryItem

NotIn() публичный Метод

Comparison ensuring that this column is NOT IN a list of values. See tgComparisonOperand Enumeration.
public NotIn ( ) : tgComparison
Результат tgComparison

NotIn() публичный Метод

Comparison ensuring that this column is NOT IN a list of values.
public NotIn ( tgDynamicQuerySerializable subQuery ) : tgComparison
subQuery tgDynamicQuerySerializable
Результат tgComparison

NotLike() публичный Метод

Comparison ensuring that the value passed in is NOT LIKE this column. See tgComparisonOperand Enumeration.
public NotLike ( object value ) : tgComparison
value object The value for comparison.
Результат tgComparison

NotLike() публичный Метод

Comparison ensuring that the value passed in is NOT LIKE this column. This overload takes a single escape character. See tgComparisonOperand Enumeration.
public NotLike ( object value, char escapeCharacter ) : tgComparison
value object The value for comparison.
escapeCharacter char The single escape character.
Результат tgComparison

OP() публичный Метод

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.
public OP ( tgComparisonOperand op ) : tgComparison
op tgComparisonOperand E.g., tgComparisonOperand.IsNotNull
Результат tgComparison

OP() публичный Метод

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.
public OP ( tgComparisonOperand op, object value ) : tgComparison
op tgComparisonOperand E.g., tgComparisonOperand.IsNotNull
value object The value for this comparison
Результат tgComparison

OP() публичный Метод

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.
public OP ( tgComparisonOperand op, object value1, object value2 ) : tgComparison
op tgComparisonOperand E.g., tgComparisonOperand.Between
value1 object The first value for this comparison
value2 object The second value for this comparison
Результат tgComparison

RTrim() публичный Метод

Performs a Right Trim (remove blanks) on the column
public RTrim ( ) : tgQueryItem
Результат tgQueryItem

Round() публичный Метод

Performs a round on the column
public Round ( int significantDigits ) : tgQueryItem
significantDigits int Round to the number of significant digits
Результат tgQueryItem

StdDev() публичный Метод

Aggregate StdDev. See tgQuerySubOperatorType Enumeration.
public StdDev ( ) : tgQueryItem
Результат tgQueryItem

Substring() публичный Метод

Returns a portion of the string column
public Substring ( System length ) : tgQueryItem
length System How many characters to return
Результат tgQueryItem

Substring() публичный Метод

Returns a portion of the string column
public Substring ( System start, System length ) : tgQueryItem
start System The starting character
length System How many characters to return
Результат tgQueryItem

Substring() публичный Метод

Returns a portion of the string column
public Substring ( int length ) : tgQueryItem
length int How many characters to return
Результат tgQueryItem

Substring() публичный Метод

Returns a portion of the string column
public Substring ( int start, int length ) : tgQueryItem
start int The starting character
length int How many characters to return
Результат tgQueryItem

Sum() публичный Метод

Aggregate Sum. See tgQuerySubOperatorType Enumeration.
public Sum ( ) : tgQueryItem
Результат tgQueryItem

ToLower() публичный Метод

Returns the column in LOWER CASE
public ToLower ( ) : tgQueryItem
Результат tgQueryItem

ToString() публичный Метод

ToString() (to use in GroupBy/OrderBy and such ....)
public ToString ( ) : string
Результат string

ToUpper() публичный Метод

Returns the column in UPPER CASE
public ToUpper ( ) : tgQueryItem
Результат tgQueryItem

Trim() публичный Метод

Removes blanks from the beginning and end of the column
public Trim ( ) : tgQueryItem
Результат tgQueryItem

Var() публичный Метод

Aggregate Var. See tgQuerySubOperatorType Enumeration.
public Var ( ) : tgQueryItem
Результат tgQueryItem

operator() публичный статический Метод

public static operator ( ) : tgComparison
Результат tgComparison

operator() публичный статический Метод

public static operator ( ) : tgQueryItem
Результат tgQueryItem

tgQueryItem() публичный Метод

The tgQueryItem class is dynamically created by your BusinessEntity's DynamicQuery mechanism.
public tgQueryItem ( tgDynamicQuerySerializable query, string columnName, tgSystemType datatype ) : System
query tgDynamicQuerySerializable The esDynamicQueryTransport passed in via DynamicQuery
columnName string The columnName passed in via DynamicQuery
datatype tgSystemType The tgSystemType
Результат System