ClosedRange

extension ClosedRange where Bound: SQLExpressible
  • An SQL expression that checks the inclusion of an expression in a range.

    // email BETWEEN 'A' AND 'B'
    ("A"..."B").contains(Column("email"))
    

    Declaration

    Swift

    public func contains(_ element: SQLSpecificExpressible) -> SQLExpression
  • An SQL expression that checks the inclusion of an expression in a range.

    // email BETWEEN 'A' AND 'B' COLLATE NOCASE
    ("A"..."B").contains(Column("email").collating(.nocase))
    

    Declaration

    Swift

    public func contains(_ element: SQLCollatedExpression) -> SQLExpression