DatabaseCursor
public final class DatabaseCursor<Element> : Cursor
A cursor on a statement
-
Advances to the next element and returns it, or
nil
if no next element exists. Once nil has been returned, all subsequent calls return nil.let rows = try Row.fetchCursor(db, "SELECT ...") // DatabaseCursor<Row> while let row = try rows.next() { // Row let id: Int64 = row.value(atIndex: 0) let name: String = row.value(atIndex: 1) }
Declaration
Swift
public func next() throws -> Element?