Skip to content

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

Instance Methods

  • having(_:)
    Adds an expression to this builder’s HAVING clause by ANDing.
  • having(_:_:_:)
    Adds a column to encodable array comparison to this builder’s HAVING clause by ANDing.
  • having(_:_:column:)
    Adds a column to column comparison to this builder’s HAVING clause by ANDing.
  • having(_:between:and:)
    Shorthand for having(SQLBetween(operand, lowerBound, upperBound)).
  • having(column:between:and:)
    Shorthand for having(SQLBetween(operand: SQLColumn(column), lowerBound: SQLBind(lowerBound), upperBound: SQLBind(upperBound))).
  • having(group:)
    Builds a grouped HAVING expression by conjunction (AND).
  • orHaving(_:)
    Adds an expression to this builder’s HAVING clause by ORing.
  • orHaving(_:_:_:)
    Adds a column to encodable array comparison to this builder’s HAVING clause by ORing.
  • orHaving(_:_:column:)
    Adds a column to column comparison to this builder’s HAVING clause by ORing.
  • orHaving(_:between:and:)
    Shorthand for orHaving(SQLBetween(operand, lowerBound, upperBound)).
  • orHaving(column:between:and:)
    Shorthand for orHaving(SQLBetween(operand: SQLColumn(column), lowerBound: SQLBind(lowerBound), upperBound: SQLBind(upperBound))).
  • orHaving(group:)
    Builds a grouped HAVING expression by inclusive disjunction (‘OR’).

Relationships

Inherited By

Conforming Types

See Also

Builder Protocols

  • SQLAliasedColumnListBuilder
    Common definitions for query builders which permit specifying aliased column names.
  • SQLColumnUpdateBuilder
    Common definitions for query builders which support assigning values to columns.
  • SQLJoinBuilder
    Common definitions for any query builder which permits specifying joins.
  • SQLPartialResultBuilder
    Common definitions for any query builder which permits specifying range and ordering behaviors.
  • SQLPredicateBuilder
    Common definitions for any query builder which permits specifying a primary predicate.
  • SQLQueryBuilder
    Base definitions for builders which set up queries and execute them against a given database.
  • SQLQueryFetcher
    Common definitions for SQLQueryBuilders which support retrieving result rows.
  • SQLReturningBuilder
    Common definitions for any query builder which can return values from data-mutating queries.
  • SQLSubqueryClauseBuilder
    A builder which can construct - but not execute - a complete SELECT query. Useful for building CTEs, CREATE TABLE ... SELECT clauses, etc., not to mention actual SELECT queries.
  • SQLUnqualifiedColumnListBuilder
    Common definitions for query builders which permit or require specifying a list of unqualified column names.