Query

public protocol Query : Buildable

Defines the protocol for queries.

Query protocol

  • execute(_:onCompletion:) Extension method

    Execute the query.

    Declaration

    Swift

    public func execute(_ connection: Connection, onCompletion: @escaping ((QueryResult) -> ()))

    Parameters

    connection

    The plugin that implements the Connection protocol and executes the query.

    onCompletion

    The function to be called when the execution of the query has completed.

  • Execute the query with parameters.

    Declaration

    Swift

    public func execute(_ connection: Connection, parameters: [Any], onCompletion: @escaping ((QueryResult) -> ()))

    Parameters

    connection

    The plugin that implements the Connection protocol and executes the query.

    parameters

    An array of the query parameters.

    onCompletion

    The function to be called when the execution of the query has completed.