Skip to content

Commit 884627c

Browse files
authored
Merge pull request #1168 from stephencelis/revert-prepareRowIterator
prepareRowIterator should be internal
2 parents 3977813 + 570efef commit 884627c

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

Documentation/Index.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,15 +2125,7 @@ using the following functions.
21252125
}
21262126
}
21272127
```
2128-
Statements with results may be iterated over, using a `RowIterator` if
2129-
useful.
21302128

2131-
```swift
2132-
let emailColumn = Expression<String>("email")
2133-
let stmt = try db.prepare("SELECT id, email FROM users")
2134-
let emails = try! stmt.prepareRowIterator().map { $0[emailColumn] }
2135-
```
2136-
21372129
- `run` prepares a single `Statement` object from a SQL string, optionally
21382130
binds values to it (using the statement’s `bind` function), executes,
21392131
and returns the statement.

Sources/SQLite/Core/Statement.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ extension Statement: FailableIterator {
236236
}
237237

238238
extension Statement {
239-
public func prepareRowIterator() -> RowIterator {
240-
return RowIterator(statement: self, columnNames: self.columnNameMap)
239+
func prepareRowIterator() -> RowIterator {
240+
RowIterator(statement: self, columnNames: columnNameMap)
241241
}
242242

243243
var columnNameMap: [String: Int] {

Tests/SQLiteTests/Core/StatementTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import XCTest
2-
import SQLite
2+
@testable import SQLite
33

44
#if SQLITE_SWIFT_STANDALONE
55
import sqlite3

0 commit comments

Comments
 (0)