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
where
IWhereCondition
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
where
Action<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
where
IWhereCondition
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
where
Action<WhereCondition>
Returns
- TParent
Where(params IWhereCondition[])
Adds the given where conditions to the query
TParent Where(params IWhereCondition[] conditions)
Parameters
conditions
IWhereCondition[]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
condition
Action<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
where
stringWhere condition
parameters
QueryDataParametersQuery 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
columnName
stringColumn name
op
QueryOperatorOperator
value
objectValue
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
columnName
stringColumn name
op
QueryUnaryOperatorOperator
Returns
- TParent
WhereContains(string, string)
Adds the condition for a string column to contain some substring
TParent WhereContains(string columnName, string value)
Parameters
columnName
stringColumn name
value
stringValue
Returns
- TParent
WhereEmpty(string)
Adds the where condition for a null or empty column value
TParent WhereEmpty(string columnName)
Parameters
columnName
stringColumn 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
columnName
stringColumn name
value
objectValue
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
columnName
stringColumn name
value
objectValue
Returns
- TParent
WhereExists(IDataQuery)
Adds where condition with EXISTS and the nested query "EXISTS (...)"
TParent WhereExists(IDataQuery nestedQuery)
Parameters
nestedQuery
IDataQueryNested query
Returns
- TParent
WhereFalse(string)
Adds the where condition for a false column value (boolean column equals false).
TParent WhereFalse(string columnName)
Parameters
columnName
stringColumn 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
columnName
stringColumn name
id
intID
Returns
- TParent
WhereIn(string, IDataQuery)
Adds where condition to the nested query, e.g. "columnName IN (...)"
TParent WhereIn(string columnName, IDataQuery nestedQuery)
Parameters
columnName
stringColumn name
nestedQuery
IDataQueryNested 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
columnName
stringColumn name
values
ICollection<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
columnName
stringColumn name
values
ICollection<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
columnName
stringColumn name
values
ICollection<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
columnName
stringColumn name
value
stringValue
Returns
- TParent
WhereNot(IWhereCondition)
Adds the negation of the given where condition
TParent WhereNot(IWhereCondition where)
Parameters
where
IWhereConditionWhere 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
columnName
stringColumn name
value
stringValue
Returns
- TParent
WhereNotEmpty(string)
Adds the where condition for a non empty column value
TParent WhereNotEmpty(string columnName)
Parameters
columnName
stringColumn name
Returns
- TParent
WhereNotExists(IDataQuery)
Adds where condition with NOT EXISTS and the nested query "NOT EXISTS (...)"
TParent WhereNotExists(IDataQuery nestedQuery)
Parameters
nestedQuery
IDataQueryNested 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
columnName
stringColumn name
nestedQuery
IDataQueryNested 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
columnName
stringColumn name
values
ICollection<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
columnName
stringColumn name
values
ICollection<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
columnName
stringColumn name
values
ICollection<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
columnName
stringColumn name
value
stringValue
Returns
- TParent
WhereNotNull(string)
Adds the where condition for a not null column value
TParent WhereNotNull(string columnName)
Parameters
columnName
stringColumn 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
columnName
stringColumn name
value
stringValue
Returns
- TParent
WhereNull(string)
Adds the where condition for a null column value
TParent WhereNull(string columnName)
Parameters
columnName
stringColumn 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
columnName
stringColumn name
value
stringValue
Returns
- TParent
WhereTrue(string)
Adds the where condition for a true column value (boolean column equals true).
TParent WhereTrue(string columnName)
Parameters
columnName
stringColumn name
Returns
- TParent