Array

struct Array<Element> : _DestructorSafeContainer
  • Creates an array containing the elements of a cursor.

    let cursor = try String.fetchCursor(db, sql: "SELECT 'foo' UNION ALL SELECT 'bar'")
    let strings = try Array(cursor) // ["foo", "bar"]
    

    Declaration

    Swift

    @inlinable
    public init<C>(_ cursor: C) throws where Element == C.Element, C : Cursor