Set

extension Set
  • Creates a set containing the elements of a cursor.

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

    Declaration

    Swift

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