RangeRowAdapter

public struct RangeRowAdapter : RowAdapter

RangeRowAdapter is a row adapter that only exposes a range of columns.

let adapter = RangeRowAdapter(1..<3)
let sql = "SELECT 1 AS foo, 2 AS bar, 3 AS baz, 4 as qux"

// [bar:2 baz:3]
try Row.fetchOne(db, sql: sql, adapter: adapter)
  • Creates a RangeRowAdapter that only exposes a range of columns.

    Declaration

    Swift

    public init(_ range: CountableRange<Int>)
  • Creates a RangeRowAdapter that only exposes a range of columns.

    Declaration

    Swift

    public init(_ range: CountableClosedRange<Int>)