Protocol
SQLSecondaryPredicateBuilder
Common definitions for any query builder which permits specifying a secondary predicate.
protocol SQLSecondaryPredicateBuilder : AnyObject
Overview
Expressions specified with
having(_:)are considered conjunctive (AND).Expressions specified with
orHaving(_:)are considered inclusively disjunctive (OR).
See SQLSecondaryPredicateGroupBuilder for details of grouping expressions (e.g. with parenthesis).
Topics
Instance Properties
var secondaryPredicate: (any SQLExpression)?The secondary predicate under construction.
Instance Methods
func having(any SQLExpression) -> SelfAdds an expression to this builder’sHAVINGclause byANDing.func having(_:_:_:)Adds a column to encodable array comparison to this builder’sHAVINGclause byANDing.func having(_:_:column:)Adds a column to column comparison to this builder’sHAVINGclause byANDing.func having(_:between:and:)Shorthand forhaving(SQLBetween(operand, lowerBound, upperBound)).func having(column:between:and:)Shorthand forhaving(SQLBetween(operand: SQLColumn(column), lowerBound: SQLBind(lowerBound), upperBound: SQLBind(upperBound))).func having(group: (SQLSecondaryPredicateGroupBuilder) throws -> SQLSecondaryPredicateGroupBuilder) rethrows -> SelfBuilds a groupedHAVINGexpression by conjunction (AND).func orHaving(any SQLExpression) -> SelfAdds an expression to this builder’sHAVINGclause byORing.func orHaving(_:_:_:)Adds a column to encodable array comparison to this builder’sHAVINGclause byORing.func orHaving(_:_:column:)Adds a column to column comparison to this builder’sHAVINGclause byORing.func orHaving(_:between:and:)Shorthand fororHaving(SQLBetween(operand, lowerBound, upperBound)).func orHaving(column:between:and:)Shorthand fororHaving(SQLBetween(operand: SQLColumn(column), lowerBound: SQLBind(lowerBound), upperBound: SQLBind(upperBound))).func orHaving(group: (SQLSecondaryPredicateGroupBuilder) throws -> SQLSecondaryPredicateGroupBuilder) rethrows -> SelfBuilds a groupedHAVINGexpression by inclusive disjunction (‘OR’).
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 SQLPredicateBuilderCommon definitions for any query builder which permits specifying a primary predicate.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 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.