SQLSpecificExpressible

public protocol SQLSpecificExpressible : SQLExpressible
  • Returns an SQL expression that applies the Swift’s built-in capitalized String property. It is NULL for non-String arguments.

    let nameColumn = Column("name")
    let request = Player.select(nameColumn.capitalized)
    let names = try String.fetchAll(dbQueue, request)   // [String]
    

    Declaration

    Swift

    public var capitalized: SQLExpression
  • Returns an SQL expression that applies the Swift’s built-in lowercased String property. It is NULL for non-String arguments.

    let nameColumn = Column("name")
    let request = Player.select(nameColumn.lowercased())
    let names = try String.fetchAll(dbQueue, request)   // [String]
    

    Declaration

    Swift

    public var lowercased: SQLExpression
  • Returns an SQL expression that applies the Swift’s built-in uppercased String property. It is NULL for non-String arguments.

    let nameColumn = Column("name")
    let request = Player.select(nameColumn.uppercased())
    let names = try String.fetchAll(dbQueue, request)   // [String]
    

    Declaration

    Swift

    public var uppercased: SQLExpression
  • Returns an SQL expression that applies the Swift’s built-in localizedCapitalized String property. It is NULL for non-String arguments.

    let nameColumn = Column("name")
    let request = Player.select(nameColumn.localizedCapitalized)
    let names = try String.fetchAll(dbQueue, request)   // [String]
    

    Declaration

    Swift

    public var localizedCapitalized: SQLExpression
  • Returns an SQL expression that applies the Swift’s built-in localizedLowercased String property. It is NULL for non-String arguments.

    let nameColumn = Column("name")
    let request = Player.select(nameColumn.localizedLowercased)
    let names = try String.fetchAll(dbQueue, request)   // [String]
    

    Declaration

    Swift

    public var localizedLowercased: SQLExpression
  • Returns an SQL expression that applies the Swift’s built-in localizedUppercased String property. It is NULL for non-String arguments.

    let nameColumn = Column("name")
    let request = Player.select(nameColumn.localizedUppercased)
    let names = try String.fetchAll(dbQueue, request)   // [String]
    

    Declaration

    Swift

    public var localizedUppercased: SQLExpression
  • An SQL expression with the LIKE SQL operator.

    // email LIKE '%@example.com"
    Column("email").like("%@example.com")
    

    Declaration

    Swift

    public func like(_ pattern: SQLExpressible) -> SQLExpression