SQLSelectQuery

public protocol SQLSelectQuery : Request, SQLCollection

This protocol is an implementation detail of the query interface. Do not use it directly.

See https://github.com/groue/GRDB.swift/#the-query-interface

Low Level Query Interface

SQLSelectQuery is the protocol for types that represent a full select query.

  • This function is an implementation detail of the query interface. Do not use it directly.

    See https://github.com/groue/GRDB.swift/#the-query-interface

    Low Level Query Interface

    Returns the SQL string of the select query.

    When the arguments parameter is nil, any value must be written down as a literal in the returned SQL.

    When the arguments parameter is not nil, then values may be replaced by ? or colon-prefixed tokens, and fed into arguments.

    Declaration

    Swift

    func selectQuerySQL(_ arguments: inout StatementArguments?) -> String
  • exists() Extension method

    Returns an SQL expression that checks whether the receiver, as a subquery, returns any row.

    let request = Person.all()
    request.exists()   // EXISTS (SELECT * FROM persons)
    

    Declaration

    Swift

    public func exists() -> SQLExpression