Parameter

public struct Parameter : Buildable

Query parameter, either numbered, or named, or just marked with a marker.

  • An optional name of the parameter.

    Declaration

    Swift

    public private(set) var name: String? { get }
  • Initialize an instance of Parameter.

    Declaration

    Swift

    public init(_ name: String? = nil)

    Parameters

    name

    An optional name of the parameter.

  • Build the parameter using QueryBuilder. If the parameter’s name is set, return it along with the named parameter marker in QueryBuilder. Otherwise, return the numbered parameter marker in QueryBuilder.

    Throws

    QueryError.syntaxError if query build fails.

    Declaration

    Swift

    public func build(queryBuilder: QueryBuilder) throws -> String

    Parameters

    queryBuilder

    The QueryBuilder to use.

    Return Value

    A String representation of the parameter.

  • Create a Filter clause using the in operator.

    Declaration

    Swift

    public func `in`(_ values: Parameter...) -> Filter

    Parameters

    values

    The list of values for the in expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the in operator.

    Declaration

    Swift

    public func `in`(_ values: [Parameter]) -> Filter

    Parameters

    values

    An array of values for the in expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the notIn operator.

    Declaration

    Swift

    public func notIn(_ values: Parameter...) -> Filter

    Parameters

    values

    The list of values for the notIn expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the notIn operator.

    Declaration

    Swift

    public func notIn(_ values: [Parameter]) -> Filter

    Parameters

    values

    An array of values for the notIn expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the between operator.

    Declaration

    Swift

    public func between(_ value1: Parameter, and value2: Parameter) -> Filter

    Parameters

    value1

    The left hand side of the between expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the notBetween operator.

    Declaration

    Swift

    public func notBetween(_ value1: Parameter, and value2: Parameter) -> Filter

    Parameters

    value1

    The left hand side of the notBetween expression.

    Return Value

    A Filter containing the clause.

  • Create a Having clause using the in operator.

    Declaration

    Swift

    public func `in`(_ values: Parameter...) -> Having

    Parameters

    values

    The list of values for the in expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the in operator.

    Declaration

    Swift

    public func `in`(_ values: [Parameter]) -> Having

    Parameters

    values

    An array of values for the in expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the notIn operator.

    Declaration

    Swift

    public func notIn(_ values: Parameter...) -> Having

    Parameters

    values

    The list of values for the notIn expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the notIn operator.

    Declaration

    Swift

    public func notIn(_ values: [Parameter]) -> Having

    Parameters

    values

    An array of values for the notIn expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the between operator.

    Declaration

    Swift

    public func between(_ value1: Parameter, and value2: Parameter) -> Having

    Parameters

    value1

    The left hand side of the between expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the notBetween operator.

    Declaration

    Swift

    public func notBetween(_ value1: Parameter, and value2: Parameter) -> Having

    Parameters

    value1

    The left hand side of the notBetween expression.

    Return Value

    A Having containing the clause.

  • Create a Filter clause using the like operator.

    Declaration

    Swift

    public func like(_ pattern: String) -> Filter

    Parameters

    pattern

    The pattern to use in the like expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the like operator with Parameter.

    Declaration

    Swift

    public func like(_ pattern: Parameter) -> Filter

    Parameters

    pattern

    The pattern to use in the like expression as Parameter.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the notLike operator.

    Declaration

    Swift

    public func notLike(_ pattern: String) -> Filter

    Parameters

    pattern

    The pattern to use in the notLike expression.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the notLike operator with Parameter.

    Declaration

    Swift

    public func notLike(_ pattern: Parameter) -> Filter

    Parameters

    pattern

    The pattern to use in the notLike expression as Parameter.

    Return Value

    A Filter containing the clause.

  • Create a Having clause using the like operator.

    Declaration

    Swift

    public func like(_ pattern: String) -> Having

    Parameters

    pattern

    The pattern to use in the like expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the like operator with Parameter.

    Declaration

    Swift

    public func like(_ pattern: Parameter) -> Having

    Parameters

    pattern

    The pattern to use in the like expression as Parameter.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the notLike operator.

    Declaration

    Swift

    public func notLike(_ pattern: String) -> Having

    Parameters

    pattern

    The pattern to use in the notLike expression.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the notLike operator with Parameter.

    Declaration

    Swift

    public func notLike(_ pattern: Parameter) -> Having

    Parameters

    pattern

    The pattern to use in the notLike expression as Parameter.

    Return Value

    A Having containing the clause.

  • Create a Filter clause using the in operator for subquery.

    Declaration

    Swift

    public func `in`(_ query: Select) -> Filter

    Parameters

    query

    The subquery.

    Return Value

    A Filter containing the clause.

  • Create a Filter clause using the notIn operator for subquery.

    Declaration

    Swift

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

    Parameters

    query

    The subquery.

    Return Value

    A Filter containing the clause.

  • Create a Having clause using the in operator for subquery.

    Declaration

    Swift

    public func `in`(_ query: Select) -> Having

    Parameters

    query

    The subquery.

    Return Value

    A Having containing the clause.

  • Create a Having clause using the notIn operator for subquery.

    Declaration

    Swift

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

    Parameters

    query

    The subquery.

    Return Value

    A Having containing the clause.