We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef2257a commit 1a50a03Copy full SHA for 1a50a03
Documentation/Index.md
@@ -1963,6 +1963,14 @@ using the following functions.
1963
}
1964
1965
```
1966
+ Statements with results may be iterated over, using a `RowIterator` if
1967
+ useful.
1968
+
1969
+ ```swift
1970
+ let emailColumn = Expression<String>("email")
1971
+ let stmt = try db.prepare("SELECT id, email FROM users")
1972
+ let emails = try! stmt.prepareRowIterator().map { $0[emailColumn] }
1973
+ ```
1974
1975
- `run` prepares a single `Statement` object from a SQL string, optionally
1976
binds values to it (using the statement’s `bind` function), executes,
0 commit comments