Skip to content

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

Instance Methods

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

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.
  • 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.
  • SQLSecondaryPredicateBuilder
    Common definitions for any query builder which permits specifying a secondary predicate.
  • 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.