ISqlWhereBuilder Interface
.NET Standard 2.x
Represents an object used to build the WHERE clause in a SQL statement.
The WHERE clause specifies the search condition for the rows returned by a query.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Inherited Constructor
SnapObjects.Data.ISqlGroupBuilder
Syntax
public interface ISqlWhereBuilder : ISqlGroupBuilder;
Property
Name | Return Type | Description |
---|---|---|
HasWhere | bool | Determines whether any search condition has been added to the WHERE clause of the current object using a Where or WhereRaw method and so on. |
Methods
Name | Return Type | Description |
---|---|---|
AsGroupBy() | ISqlGroupBuilder | Returns an ISqlGroupBuilder object which represents an object used to build the GROUP BY clause in a SQL statement. |
RemoveWhere() | bool | Removes all of the search conditions that have been added to the WHERE clause. |
RemoveWhere(string whereName) | bool | Removes the search condition (specified by name) from the WHERE clause. |
Where(string left, string right) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies SQL expressions on both the left and right of the operator. The operator is '='. |
Where(string left, SqlBinaryOperator sqlOperator, string right) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies SQL expressions on both the left and right of the operator. |
Where(string left, ISqlParameter parameter) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies a SQL expression on the left of the operator and a SQL parameter on the right of the operator. The operator is '='. |
Where(string left, SqlBinaryOperator sqlOperator, ISqlParameter parameter) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies a SQL expression on the left of the operator and a SQL parameter on the right of the operator. |
Where(string left, ISqlBuilder sqlBuilder) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies a SQL expression on the left of the operator and a SQL subquery on the right. The operator is '='. |
Where(string left, SqlBinaryOperator sqlOperator, ISqlBuilder sqlBuilder) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies a SQL expression on the left of the operator and a SQL subquery on the right. |
Where(ISqlWhereCondition condition) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause by an ISqlWhereCondition object. |
Where(ISqlWhereCondition condition, string whereName) | ISqlWhereAndOr | Creates a WHERE clause, adds a search condition to the WHERE clause by an ISqlWhereCondition object, and specifies a name for the search condition. |
WhereExists(ISqlBuilder sqlBuilder) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Uses EXISTS to test for the existence of the record returned from a subquery. |
WhereIsNotNull(string left) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Uses IS NOT NULL operator to search for values that are not null. |
WhereIsNull(string left) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Uses IS NULL operator to search for values that are null. |
WhereNotExists(ISqlBuilder sqlBuilder) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Uses the NOT EXISTS operator to test if the record returned from a subquery does not exist. |
WhereRaw(string whereClause, params ISqlParameter[] parameters) | ISqlWhereAndOr | Creates a WHERE clause, and adds a raw SQL to the WHERE clause. |
WhereRaw(string whereClause, string whereName, params ISqlParameter[] parameters) | ISqlWhereAndOr | Creates a WHERE clause, adds a raw SQL to the WHERE clause, and specifies a name for the raw SQL. |
WhereValue(string left, object value) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies a SQL expression on the left of the operator and a specific value on the right of the operator. The operator is '='. |
WhereValue(string left, SqlBinaryOperator sqlOperator, object value) | ISqlWhereAndOr | Creates a WHERE clause, and adds a search condition to the WHERE clause. Specifies a SQL expression on the left of the operator and a specific value on the right of the operator. |