Where

public final class Where: Query, GroupByRouter, OrderByRouter, LimitRouter

Where class represents the WHERE clause of the query statement.

  • Create and chain an ORDER BY component for specifying the orderings of the query result.

    Declaration

    Swift

    public func orderBy(_ orderings: OrderingProtocol...) -> OrderBy

    Parameters

    orderings

    The ordering objects.

    Return Value

    The OrderBy object.

  • Create and chain an ORDER BY component for specifying the orderings of the query result.

    Declaration

    Swift

    public func orderBy(_ orderings: [OrderingProtocol]) -> OrderBy

    Parameters

    orderings

    The ordering objects.

    Return Value

    The OrderBy object.

  • Create and chain a GROUP BY component to group the query result.

    Declaration

    Swift

    public func groupBy(_ expressions: ExpressionProtocol...) -> GroupBy

    Parameters

    expressions

    The expression objects.

    Return Value

    The GroupBy object.

  • Create and chain a GROUP BY component to group the query result.

    Declaration

    Swift

    public func groupBy(_ expressions: [ExpressionProtocol]) -> GroupBy

    Parameters

    expressions

    The expression objects.

    Return Value

    The GroupBy object.

  • Create and chain a LIMIT component to limit the number query results.

    Declaration

    Swift

    public func limit(_ limit: ExpressionProtocol) -> Limit

    Parameters

    limit

    The limit Expression object or liternal value.

    Return Value

    The Limit object.

  • Create and chain a LIMIT component to skip the returned results for the given offset position and to limit the number of results to not more than the given limit value.

    Declaration

    Swift

    public func limit(_ limit: ExpressionProtocol, offset: ExpressionProtocol?) -> Limit

    Parameters

    limit

    The limit Expression object or liternal value.

    offset

    The offset Expression object or liternal value.

    Return Value

    The Limit object.