C# Class Tiraggo.DynamicQuery.tgQueryItem

Afficher le fichier Open project: BrewDawg/Tiraggo Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

As() public méthode

Privides the Ability to Alias a column name
public As ( string alias ) : tgQueryItem
alias string The Alias Name
Résultat tgQueryItem

Avg() public méthode

Aggregate Avg. See tgQuerySubOperatorType Enumeration.
public Avg ( ) : tgQueryItem
Résultat tgQueryItem

Between() public méthode

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.
Résultat tgComparison

Case() public méthode

public Case ( ) : tgCase
Résultat tgCase

Cast() public méthode

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
Résultat tgQueryItem

Cast() public méthode

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
Résultat tgQueryItem

Cast() public méthode

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
Résultat tgQueryItem

Coalesce() public méthode

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
Résultat tgQueryItem

Contains() public méthode

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.
Résultat tgComparison

Count() public méthode

Aggregate Count. See tgQuerySubOperatorType Enumeration.
public Count ( ) : tgQueryItem
Résultat tgQueryItem

Date() public méthode

Returns the Date only portion of a date columm
public Date ( ) : tgQueryItem
Résultat tgQueryItem

DatePart() public méthode

Returns a particular date part of a date column
public DatePart ( string datePart ) : tgQueryItem
datePart string
Résultat tgQueryItem

Distinct() public méthode

Set to true for (DISTINCT columnName).
public Distinct ( ) : tgQueryItem
Résultat tgQueryItem

GetHashCode() public méthode

Required due to operator overloading.
public GetHashCode ( ) : int
Résultat int

In() public méthode

Comparison ensuring that this column is IN a list of values. See tgComparisonOperand Enumeration.
public In ( ) : tgComparison
Résultat tgComparison

In() public méthode

Comparison ensuring that this column is IN a list of values.
public In ( tgDynamicQuerySerializable subQuery ) : tgComparison
subQuery tgDynamicQuerySerializable
Résultat tgComparison

IsNotNull() public méthode

Comparison ensuring that this column is NOT NULL. See tgComparisonOperand Enumeration.
public IsNotNull ( ) : tgComparison
Résultat tgComparison

IsNull() public méthode

Comparison ensuring that this column is NULL. See tgComparisonOperand Enumeration.
public IsNull ( ) : tgComparison
Résultat tgComparison

LTrim() public méthode

Performs a Left Trim (remove blanks) on the column
public LTrim ( ) : tgQueryItem
Résultat tgQueryItem

Length() public méthode

Returns the length of a character based column
public Length ( ) : tgQueryItem
Résultat tgQueryItem

Like() public méthode

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.
Résultat tgComparison

Like() public méthode

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.
Résultat tgComparison

Max() public méthode

Aggregate Max. See tgQuerySubOperatorType Enumeration.
public Max ( ) : tgQueryItem
Résultat tgQueryItem

Min() public méthode

Aggregate Min. See tgQuerySubOperatorType Enumeration.
public Min ( ) : tgQueryItem
Résultat tgQueryItem

NotIn() public méthode

Comparison ensuring that this column is NOT IN a list of values. See tgComparisonOperand Enumeration.
public NotIn ( ) : tgComparison
Résultat tgComparison

NotIn() public méthode

Comparison ensuring that this column is NOT IN a list of values.
public NotIn ( tgDynamicQuerySerializable subQuery ) : tgComparison
subQuery tgDynamicQuerySerializable
Résultat tgComparison

NotLike() public méthode

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.
Résultat tgComparison

NotLike() public méthode

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.
Résultat tgComparison

OP() public méthode

Where parameter operand creation is called by DynamicQuery. See tgComparisonOperand Enumeration.
public OP ( tgComparisonOperand op ) : tgComparison
op tgComparisonOperand E.g., tgComparisonOperand.IsNotNull
Résultat tgComparison

OP() public méthode

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
Résultat tgComparison

OP() public méthode

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
Résultat tgComparison

RTrim() public méthode

Performs a Right Trim (remove blanks) on the column
public RTrim ( ) : tgQueryItem
Résultat tgQueryItem

Round() public méthode

Performs a round on the column
public Round ( int significantDigits ) : tgQueryItem
significantDigits int Round to the number of significant digits
Résultat tgQueryItem

StdDev() public méthode

Aggregate StdDev. See tgQuerySubOperatorType Enumeration.
public StdDev ( ) : tgQueryItem
Résultat tgQueryItem

Substring() public méthode

Returns a portion of the string column
public Substring ( System length ) : tgQueryItem
length System How many characters to return
Résultat tgQueryItem

Substring() public méthode

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
Résultat tgQueryItem

Substring() public méthode

Returns a portion of the string column
public Substring ( int length ) : tgQueryItem
length int How many characters to return
Résultat tgQueryItem

Substring() public méthode

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
Résultat tgQueryItem

Sum() public méthode

Aggregate Sum. See tgQuerySubOperatorType Enumeration.
public Sum ( ) : tgQueryItem
Résultat tgQueryItem

ToLower() public méthode

Returns the column in LOWER CASE
public ToLower ( ) : tgQueryItem
Résultat tgQueryItem

ToString() public méthode

ToString() (to use in GroupBy/OrderBy and such ....)
public ToString ( ) : string
Résultat string

ToUpper() public méthode

Returns the column in UPPER CASE
public ToUpper ( ) : tgQueryItem
Résultat tgQueryItem

Trim() public méthode

Removes blanks from the beginning and end of the column
public Trim ( ) : tgQueryItem
Résultat tgQueryItem

Var() public méthode

Aggregate Var. See tgQuerySubOperatorType Enumeration.
public Var ( ) : tgQueryItem
Résultat tgQueryItem

operator() public static méthode

public static operator ( ) : tgComparison
Résultat tgComparison

operator() public static méthode

public static operator ( ) : tgQueryItem
Résultat tgQueryItem

tgQueryItem() public méthode

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
Résultat System