SQLQueryFetcher

public protocol SQLQueryFetcher : SQLQueryBuilder

A SQLQueryBuilder that supports decoding results.

builder.all(decoding: Planet.self)
  • all() Extension method

    Collects all raw output into an array and returns it.

    builder.all()
    

    Declaration

    Swift

    public func all() -> Future<[Connection.Output]>
  • all(decoding:) Extension method

    Collects all decoded output into an array and returns it.

    builder.all(decoding: Planet.self)
    

    Declaration

    Swift

    public func all<A>(decoding type: A.Type) -> Future<[A]>
        where A: Decodable
  • all(decoding:_:) Extension method

    Decodes two types from the result set. Collects all decoded output into an array and returns it.

    builder.all(decoding: Planet.self, Galaxy.self)
    

    Declaration

    Swift

    public func all<A, B>(decoding a: A.Type, _ b: B.Type) -> Future<[(A, B)]>
        where A: Decodable, B: Decodable
  • all(decoding:_:_:) Extension method

    Decodes three types from the result set. Collects all decoded output into an array and returns it.

    builder.all(decoding: Planet.self, Galaxy.self, SolarSystem.self)
    

    Declaration

    Swift

    public func all<A, B, C>(decoding a: A.Type, _ b: B.Type, _ c: C.Type) -> Future<[(A, B, C)]>
        where A: Decodable, B: Decodable, C: Decodable
  • run(_:) Extension method

    Runs the query, passing output to the supplied closure as it is recieved.

    builder.run { print($0) }
    

    The returned future will signal completion of the query.

    Declaration

    Swift

    public func run(_ handler: @escaping (Connection.Output) throws -> ()) -> Future<Void>
  • run(decoding:into:) Extension method

    Runs the query, passing decoded output to the supplied closure as it is recieved.

    builder.run(decoding: Planet.self) { planet in
        // ..
    }
    

    The returned future will signal completion of the query.

    Declaration

    Swift

    public func run<A>(
        decoding type: A.Type,
        into handler: @escaping (A) throws -> ()
    ) -> Future<Void>
        where A: Decodable
  • run(decoding:_:into:) Extension method

    Runs the query, passing decoded output to the supplied closure as it is recieved.

    builder.run(decoding: Planet.self, Galaxy.self) { planet, galaxy in
        // ..
    }
    

    The returned future will signal completion of the query.

    Declaration

    Swift

    public func run<A, B>(
        decoding a: A.Type, _ b: B.Type,
        into handler: @escaping (A, B) throws -> ()
    ) -> Future<Void>
        where A: Decodable, B: Decodable
  • run(decoding:_:_:into:) Extension method

    Runs the query, passing decoded output to the supplied closure as it is recieved.

    builder.run(decoding: Planet.self, Galaxy.self, SolarSystem.self) { planet, galaxy, solarSystem in
        // ..
    }
    

    The returned future will signal completion of the query.

    Declaration

    Swift

    public func run<A, B, C>(
        decoding a: A.Type, _ b: B.Type, _ c: C.Type,
        into handler: @escaping (A, B, C) throws -> ()
    ) -> Future<Void>
        where A: Decodable, B: Decodable, C: Decodable