Protocol
SQLPredicateBuilder
Common definitions for any query builder which permits specifying a primary predicate.
protocol SQLPredicateBuilder : AnyObject
Mentioned in
Overview
Expressions specified with
where(_:)are considered conjunctive (AND).Expressions specified with
orWhere(_:)are considered inclusively disjunctive (OR).
See SQLPredicateGroupBuilder for details of grouping expressions (e.g. with parenthesis).
Topics
Instance Properties
var predicate: (any SQLExpression)?The predicate under construction.
Instance Methods
func orWhere(any SQLExpression) -> SelfAdds an expression to this builder’sWHEREclause byORing.func orWhere(_:_:_:)Adds a column to encodable array comparison to this builder’sWHEREclause byORing.func orWhere(_:_:column:)Adds a column to column comparison to this builder’sWHEREclause byORing.func orWhere(_:between:and:)Shorthand fororWhere(SQLBetween(operand, lowerBound, upperBound)).func orWhere(column:between:and:)Shorthand fororWhere(SQLBetween(operand: SQLColumn(column), lowerBound: SQLBind(lowerBound), upperBound: SQLBind(upperBound))).func orWhere(group: (SQLPredicateGroupBuilder) throws -> SQLPredicateGroupBuilder) rethrows -> SelfBuilds a groupedWHEREexpression by inclusive disjunction (OR).func `where`(any SQLExpression) -> SelfAdds an expression to this builder’sWHEREclause byANDing.func `where`(_:_:_:)Adds a column to encodable array comparison to this builder’sWHEREclause byANDing.func `where`(_:_:column:)Adds a column to column comparison to this builder’sWHEREclause byANDing.func `where`(_:between:and:)Shorthand forwhere(SQLBetween(operand, lower, upperBound)).func `where`(column:between:and:)Shorthand forwhere(SQLBetween(operand: SQLColumn(column), lowerBound: SQLBind(lowerBound), upperBound: SQLBind(upperBound))).func `where`(group: (SQLPredicateGroupBuilder) throws -> SQLPredicateGroupBuilder) rethrows -> SelfBuilds a groupedWHEREexpression by conjunction (AND).
Relationships
Inherited By
Conforming Types
See Also
Builder Protocols
protocol SQLAliasedColumnListBuilderCommon definitions for query builders which permit specifying aliased column names.protocol SQLColumnUpdateBuilderCommon definitions for query builders which support assigning values to columns.protocol SQLCommonTableExpressionBuilderCommon definitions for query builders which support Common Table Expressions.protocol SQLCommonUnionBuilderprotocol SQLJoinBuilderCommon definitions for any query builder which permits specifying joins.protocol SQLPartialResultBuilderCommon definitions for any query builder which permits specifying range and ordering behaviors.protocol SQLQueryBuilderBase definitions for builders which set up queries and execute them against a given database.protocol SQLQueryFetcherCommon definitions forSQLQueryBuilders which support retrieving result rows.protocol SQLReturningBuilderCommon definitions for any query builder which can return values from data-mutating queries.protocol SQLSecondaryPredicateBuilderCommon definitions for any query builder which permits specifying a secondary predicate.protocol SQLSubqueryClauseBuilderA builder which can construct - but not execute - a completeSELECTquery. Useful for building CTEs,CREATE TABLE ... SELECTclauses, etc., not to mention actualSELECTqueries.protocol SQLUnqualifiedColumnListBuilderCommon definitions for query builders which permit or require specifying a list of unqualified column names.