QueryResult

public enum QueryResult

The result of an execution of a query.

  • An error occurred while executing the query.

    Declaration

    Swift

    case error(Error)
  • The result of the query execution as an a ResultSet.

    Declaration

    Swift

    case resultSet(ResultSet)
  • Indicates the query executed successfully and returned data.

    Declaration

    Swift

    case success(Any)
  • Indicates the query executed successfully and returned no data.

    Declaration

    Swift

    case successNoData
  • Indicates the query executed successfully.

    Declaration

    Swift

    public var success: Bool { get }
  • Data received from the query execution represented as a ResultSet.

    Declaration

    Swift

    public var asResultSet: ResultSet? { get }
  • Data received from the query execution represented as a PreparedStatement.

    Declaration

    Swift

    public var asPreparedStatement: PreparedStatement? { get }
  • The error that occurred during query execution.

    Declaration

    Swift

    public var asError: Error? { get }
  • The result of the query execution as a single value.

    Declaration

    Swift

    public var asValue: Any? { get }
  • Passes data received from the query execution represented as an array of dictionaries to a user defined completion handler. Each entry in the array repersents a row in the result with column titles as the keys. In case there are columns with the same title, we add indices to the keys: for example if the result contains three columns named ‘a’, the dictionary will contain the keys: a, a.1 and a.2. This function will consume the entire set of results and then call done against the result set which will allow the underlying connection to be reused. When asRows is called a user does not need to explicitly invoke the done method on the result set.

    Declaration

    Swift

    public func asRows(onCompletion: @escaping (([[String : Any?]]?, Error?)) -> ())