Skip to content

Structure

SQLBetween

An SQLExpression which constructs SQL of the form <operand> BETWEEN <lowerBound> AND <upperBound>.
struct SQLBetween<T, U, V> where T : SQLExpression, U : SQLExpression, V : SQLExpression

Overview

This syntax is a more readable way of expressing the usually identical SQL construct ((operand >= lowerBound) AND (operand <= upperBound)). However, it is functionally distinct from the dual-condition syntax in the case that the operand is a nondeterministic expression whose results can or may change per-evaluation (such as RANDOM()), in which case BETWEEN will evaluate it exactly once rather than twice.

Note

While it would be possible to use conditional conformance to Strideable to enable translating Swift RangeExpressions into SQLBetween expressions, this is considered slightly above the intended level of SQLKit’s API.

Topics

Initializers

Instance Properties

Instance Methods

Relationships

Conforms To

See Also

Basic Expressions

  • struct SQLAlias
    Encapsulates SQL’s <expression> [AS] <name> syntax, most often used to declare aliaed names for columns and tables.
  • struct SQLColumn
    An expression representing an optionally table-qualified column in an SQL table.
  • struct SQLConstraint
    An expression representing the combination of a constraint name and algorithm for table constraints.
  • enum SQLDataType
    Represents a value’s type in SQL.
  • enum SQLDirection
    Describes an ordering direction for a given sorting key.
  • struct SQLDistinct
    An expression representing the subexpression of an aggregate function call which specifies whether the aggregate groups over all result rows or only distinct rows.
  • enum SQLForeignKeyAction
    An expression specifying a behavior for a foreign key constraint violation.
  • struct SQLNestedSubpathExpression
    A “nested subpath” expression is used to descend into the “deeper” structure of a non-scalar value, such as a dictionary, array, or JSON value.
  • struct SQLQualifiedTable
    An expression representing an optionally second-level-qualified SQL table.
  • struct SQLQueryString
    An expression consisting of an array of constituent subexpressions generated by custom string interpolations.