Set
struct Set<Element> where Element : Hashable
-
Creates a set containing the elements of a cursor.
let cursor = try String.fetchCursor(db, "SELECT 'foo' UNION ALL SELECT 'foo'") let strings = try Set(cursor) // ["foo"]
Declaration
Swift
public init<C: Cursor>(_ cursor: C) throws where C.Element == Element