Interface IWhereCondition<TParent>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Interface for classes which provide where condition for a specific query type
public interface IWhereCondition<TParent> : IWhereCondition, IQueryParameters<TParent>, IQueryParameters, IQueryObject
Type Parameters
TParent
- Inherited Members
- Extension Methods
Methods
And()
Changes the where operator to AND for subsequent where conditions. Use in combination of methods Where...
TParent And()
Returns
- TParent
And(IWhereCondition)
Adds the given where condition with the AND operator
TParent And(IWhereCondition where)
Parameters
whereIWhereCondition
Returns
- TParent
And(Action<WhereCondition>)
Adds the given where condition with the AND operator. Creates a new where condition object and runs the setup actions on it.
TParent And(Action<WhereCondition> where)
Parameters
whereAction<WhereCondition>
Returns
- TParent
NewWhere()
Clears the current where condition
TParent NewWhere()
Returns
- TParent
NoResults()
Sets the where condition to exclude all data from result
TParent NoResults()
Returns
- TParent
Or()
Changes the where operator to OR for next where conditions. Use in combination of methods Where...
TParent Or()
Returns
- TParent
Or(IWhereCondition)
Adds the given where condition with the OR operator
TParent Or(IWhereCondition where)
Parameters
whereIWhereCondition
Returns
- TParent
Or(Action<WhereCondition>)
Adds the given where condition with the OR operator. Creates a new where condition object and runs the setup actions on it.
TParent Or(Action<WhereCondition> where)
Parameters
whereAction<WhereCondition>
Returns
- TParent
Where(params IWhereCondition[])
Adds the given where conditions to the query
TParent Where(params IWhereCondition[] conditions)
Parameters
conditionsIWhereCondition[]Nested where conditions
Returns
- TParent
Where(Action<WhereCondition>)
Adds the given where condition to the query. Creates a new where condition object and runs the setup actions on it.
TParent Where(Action<WhereCondition> condition)
Parameters
conditionAction<WhereCondition>Nested where condition
Returns
- TParent
Where(string, QueryDataParameters)
Adds the given where condition to the query
TParent Where(string where, QueryDataParameters parameters = null)
Parameters
wherestringWhere condition
parametersQueryDataParametersQuery parameters
Returns
- TParent
Where(string, QueryOperator, object)
Adds the given where condition to the query. Matches the column to a given value.
TParent Where(string columnName, QueryOperator op, object value)
Parameters
columnNamestringColumn name
opQueryOperatorOperator
valueobjectValue
Returns
- TParent
Where(string, QueryUnaryOperator)
Adds the given where condition to the query. Matches the column value with an unary operator.
TParent Where(string columnName, QueryUnaryOperator op)
Parameters
columnNamestringColumn name
opQueryUnaryOperatorOperator
Returns
- TParent
WhereContains(string, string)
Adds the condition for a string column to contain some substring
TParent WhereContains(string columnName, string value)
Parameters
columnNamestringColumn name
valuestringValue
Returns
- TParent
WhereEmpty(string)
Adds the where condition for a null or empty column value
TParent WhereEmpty(string columnName)
Parameters
columnNamestringColumn name
Returns
- TParent
WhereEquals(string, object)
Adds the given where condition to the query. Matches the column to a given value.
TParent WhereEquals(string columnName, object value)
Parameters
columnNamestringColumn name
valueobjectValue
Returns
- TParent
WhereEqualsOrNull(string, object)
Adds the given where condition to the query. Matches the column to a given value or null value.
TParent WhereEqualsOrNull(string columnName, object value)
Parameters
columnNamestringColumn name
valueobjectValue
Returns
- TParent
WhereExists(IDataQuery)
Adds where condition with EXISTS and the nested query "EXISTS (...)"
TParent WhereExists(IDataQuery nestedQuery)
Parameters
nestedQueryIDataQueryNested query
Returns
- TParent
WhereFalse(string)
Adds the where condition for a false column value (boolean column equals false).
TParent WhereFalse(string columnName)
Parameters
columnNamestringColumn name
Returns
- TParent
WhereID(string, int)
Adds the where condition to match the ID to the query. In case the column name is not provided or unknown, does not generate where condition. If given ID is invalid, adds the condition to match NULL.
TParent WhereID(string columnName, int id)
Parameters
columnNamestringColumn name
idintID
Returns
- TParent
WhereIn(string, IDataQuery)
Adds where condition to the nested query, e.g. "columnName IN (...)"
TParent WhereIn(string columnName, IDataQuery nestedQuery)
Parameters
columnNamestringColumn name
nestedQueryIDataQueryNested query
Returns
- TParent
WhereIn(string, ICollection<Guid>)
Adds where condition to the list of values, e.g. "columnName IN (...)"
TParent WhereIn(string columnName, ICollection<Guid> values)
Parameters
columnNamestringColumn name
valuesICollection<Guid>List of values for the query
Returns
- TParent
WhereIn(string, ICollection<int>)
Adds where condition to the list of values, e.g. "columnName IN (...)"
TParent WhereIn(string columnName, ICollection<int> values)
Parameters
columnNamestringColumn name
valuesICollection<int>List of values for the query
Returns
- TParent
WhereIn(string, ICollection<string>)
Adds where condition to the list of values, e.g. "columnName IN (...)"
TParent WhereIn(string columnName, ICollection<string> values)
Parameters
columnNamestringColumn name
valuesICollection<string>List of values for the query
Returns
- TParent
WhereLike(string, string)
Adds the given where condition to the query. Matches the column to a given value using LIKE operator.
TParent WhereLike(string columnName, string value)
Parameters
columnNamestringColumn name
valuestringValue
Returns
- TParent
WhereNot(IWhereCondition)
Adds the negation of the given where condition
TParent WhereNot(IWhereCondition where)
Parameters
whereIWhereConditionWhere condition
Returns
- TParent
WhereNotContains(string, string)
Adds the condition for a string column not to contain some substring
TParent WhereNotContains(string columnName, string value)
Parameters
columnNamestringColumn name
valuestringValue
Returns
- TParent
WhereNotEmpty(string)
Adds the where condition for a non empty column value
TParent WhereNotEmpty(string columnName)
Parameters
columnNamestringColumn name
Returns
- TParent
WhereNotExists(IDataQuery)
Adds where condition with NOT EXISTS and the nested query "NOT EXISTS (...)"
TParent WhereNotExists(IDataQuery nestedQuery)
Parameters
nestedQueryIDataQueryNested query
Returns
- TParent
WhereNotIn(string, IDataQuery)
Adds where condition to the nested query, e.g. "columnName NOT IN (...)"
TParent WhereNotIn(string columnName, IDataQuery nestedQuery)
Parameters
columnNamestringColumn name
nestedQueryIDataQueryNested query
Returns
- TParent
WhereNotIn(string, ICollection<Guid>)
Adds where condition to the list of values, e.g. "columnName NOT IN (...)"
TParent WhereNotIn(string columnName, ICollection<Guid> values)
Parameters
columnNamestringColumn name
valuesICollection<Guid>List of values for the query
Returns
- TParent
WhereNotIn(string, ICollection<int>)
Adds where condition to the list of values, e.g. "columnName NOT IN (...)"
TParent WhereNotIn(string columnName, ICollection<int> values)
Parameters
columnNamestringColumn name
valuesICollection<int>List of values for the query
Returns
- TParent
WhereNotIn(string, ICollection<string>)
Adds where condition to the list of values, e.g. "columnName NOT IN (...)"
TParent WhereNotIn(string columnName, ICollection<string> values)
Parameters
columnNamestringColumn name
valuesICollection<string>List of values for the query
Returns
- TParent
WhereNotLike(string, string)
Adds the given where condition to the query. Matches the column to a given value using NOT LIKE operator.
TParent WhereNotLike(string columnName, string value)
Parameters
columnNamestringColumn name
valuestringValue
Returns
- TParent
WhereNotNull(string)
Adds the where condition for a not null column value
TParent WhereNotNull(string columnName)
Parameters
columnNamestringColumn name
Returns
- TParent
WhereNotStartsWith(string, string)
Adds the condition for a string column not to start with some prefix
TParent WhereNotStartsWith(string columnName, string value)
Parameters
columnNamestringColumn name
valuestringValue
Returns
- TParent
WhereNull(string)
Adds the where condition for a null column value
TParent WhereNull(string columnName)
Parameters
columnNamestringColumn name
Returns
- TParent
WhereStartsWith(string, string)
Adds the condition for a string column to start with some prefix
TParent WhereStartsWith(string columnName, string value)
Parameters
columnNamestringColumn name
valuestringValue
Returns
- TParent
WhereTrue(string)
Adds the where condition for a true column value (boolean column equals true).
TParent WhereTrue(string columnName)
Parameters
columnNamestringColumn name
Returns
- TParent