Functions

The following functions are available globally.

AggregateColumnExpression

QueryFilterProtocol

  • Create a Filter clause using the OR operator.

    Declaration

    Swift

    public func || (lhs: Filter, rhs: Filter) -> Filter

    Parameters

    lhs

    A Filter - the left hand side of the clause.

    rhs

    A Filter - the right hand side of the clause.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the AND operator.

    Declaration

    Swift

    public func && (lhs: Filter, rhs: Filter) -> Filter

    Parameters

    lhs

    A Filter - the left hand side of the clause.

    rhs

    A Filter - the right hand side of the clause.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the EXISTS operator.

    Declaration

    Swift

    public func exists(_ query: Select) -> Filter

    Parameters

    query

    The Select query to apply EXISTS on.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the NOT EXISTS operator.

    Declaration

    Swift

    public func notExists(_ query: Select) -> Filter

    Parameters

    query

    The Select query to apply NOT EXISTS on.

    Return Value

    A Filter containing the clause.

  • Create a FilterPredicate using the ANY operator.

    Declaration

    Swift

    public func any(_ query: Select) -> Predicate<Filter, ScalarColumnExpression>

    Parameters

    query

    The Select query to apply ANY on.

    Return Value

    A Predicate<Filter, ScalarColumnExpression> containing the anySubquery.

  • Create a FilterPredicate using the ALL operator.

    Declaration

    Swift

    public func all(_ query: Select) -> Predicate<Filter, ScalarColumnExpression>

    Parameters

    query

    The Select query to apply ALL on.

    Return Value

    A Predicate<Filter, ScalarColumnExpression> containing the allSubquery.

QueryHavingProtocol

  • Create a Having clause using the OR operator.

    Declaration

    Swift

    public func || (lhs: Having, rhs: Having) -> Having

    Parameters

    lhs

    A Having - the left hand side of the clause.

    rhs

    A Having - the right hand side of the clause.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the AND operator.

    Declaration

    Swift

    public func && (lhs: Having, rhs: Having) -> Having

    Parameters

    lhs

    A Having - the left hand side of the clause.

    rhs

    A Having - the right hand side of the clause.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the EXISTS operator.

    Declaration

    Swift

    public func exists(_ query: Select) -> Having

    Parameters

    query

    The Select query to apply EXISTS on.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the NOT EXISTS operator.

    Declaration

    Swift

    public func notExists(_ query: Select) -> Having

    Parameters

    query

    The Select query to apply NOT EXISTS on.

    Return Value

    A Having containing the clause.

  • Create a HavingPredicate using the ANY operator.

    Declaration

    Swift

    public func any(_ query: Select) -> Predicate<Having, AggregateColumnExpression>

    Parameters

    query

    The Select query to apply ANY on.

    Return Value

    A Predicate<Having, AggregateColumnExpression> containing the anySubquery.

  • Create a HavingPredicate using the ALL operator.

    Declaration

    Swift

    public func all(_ query: Select) -> Predicate<Having, AggregateColumnExpression>

    Parameters

    query

    The Select query to apply ALL on.

    Return Value

    A Predicate<Having, AggregateColumnExpression> containing the allSubquery.

IndexColumnOrdered

  • Create a IndexColumnOrdered.ASC for the column.

    Declaration

    Swift

    public func asc(_ column: Column) -> IndexColumnOrdered

    Parameters

    column

    The column to apply IndexColumnOrdered.ASC.

    Return Value

    IndexColumnOrdered.ASC for the column.

  • Create a IndexColumnOrdered.DESC for the column.

    Declaration

    Swift

    public func desc(_ column: Column) -> IndexColumnOrdered

    Parameters

    column

    The column to apply IndexColumnOrdered.ASC.

    Return Value

    IndexColumnOrdered.DESC for the column.

ScalarColumnExpression

With

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ table: AuxiliaryTable, _ query: Select) -> Select

    Parameters

    table

    A table for a WITH clause.

    query

    A SELECT query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ tables: [AuxiliaryTable], _ query: Select) -> Select

    Parameters

    tables

    An array of tables for a WITH clause.

    query

    A SELECT query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ table: AuxiliaryTable, _ query: Insert) -> Insert

    Parameters

    table

    A table for a WITH clause.

    query

    An INSERT query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ tables: [AuxiliaryTable], _ query: Insert) -> Insert

    Parameters

    tables

    An array of tables for a WITH clause.

    query

    An INSERT query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ table: AuxiliaryTable, _ query: Update) -> Update

    Parameters

    table

    A table for a WITH clause.

    query

    An UPDATE query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ tables: [AuxiliaryTable], _ query: Update) -> Update

    Parameters

    tables

    An array of tables for a WITH clause.

    query

    An UPDATE query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ table: AuxiliaryTable, _ query: Delete) -> Delete

    Parameters

    table

    A table for a WITH clause.

    query

    A DELETE query that will use the table from the WITH clause.

  • Create a query with a WITH clause.

    Declaration

    Swift

    public func with(_ tables: [AuxiliaryTable], _ query: Delete) -> Delete

    Parameters

    tables

    An array of tables for a WITH clause.

    query

    A DELETE query that will use the table from the WITH clause.