public protocol SQLSpecificExpressible : SQLExpressible, SQLOrderingTerm, SQLSelectable

SQLSpecificExpressible is a protocol for all database-specific types that can be turned into an SQL expression. Types whose existence is not purely dedicated to the database should adopt the SQLExpressible protocol instead.

For example, Column is a type that only exists to help you build requests, and it adopts SQLSpecificExpressible.

On the other side, Int adopts SQLExpressible.


SQL Ordering Support

SQL Collations Support

Like Operator

  • like(_:escape:) Extension method

    An SQL expression with the LIKE SQL operator.

    // email LIKE '%@example.com"
    // title LIKE '%10\%%' ESCAPE '\'
    Column("title").like("%10\\%%", escape: "\\")



    public func like(_ pattern: SQLExpressible, escape: SQLExpressible? = nil) -> SQLExpression