File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ public final class SQLConnection {
30
30
/// - parameter mode: Specifies whether open the database for reading, writing
31
31
/// or both, and whether to create it on write. `.readwrite(create: true)` by default.
32
32
/// - parameter options: See `SQLConnectionOptions` for more information.
33
+ ///
34
+ /// - note: See [SQLite: Result and Error Codes](https://www.sqlite.org/rescode.html)
35
+ /// for more information.
33
36
public init ( location: Location , mode: Mode = . readwrite( create: true ) , options: Options = Options ( ) ) throws {
34
37
let path : String
35
38
var flags : Int32 = 0
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import Foundation
6
6
import SQLite3
7
7
8
8
#warning("TODO: update documentation")
9
+ /// - note: See [SQLite: Result and Error Codes](https://www.sqlite.org/rescode.html)
10
+ /// for more information.
9
11
public struct SQLError : Swift . Error , CustomStringConvertible {
10
12
// MARK: Properties
11
13
Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ public final class SQLStatement {
64
64
65
65
// MARK: Execute
66
66
67
- #warning("TODO: add example")
68
-
69
67
/// Executes the statement and returns the row (`SQLRow`) if it is available.
70
68
/// Returns nil if the statement is finished executing and no more data
71
69
/// is available. Throws an error if an error is encountered.
@@ -79,14 +77,19 @@ public final class SQLStatement {
79
77
/// objects.append(user)
80
78
/// }
81
79
///
80
+ /// - note: See [SQLite: Result and Error Codes](https://www.sqlite.org/rescode.html)
81
+ /// for more information.
82
82
public func next( ) throws -> SQLRow ? {
83
83
guard try isOK ( sqlite3_step ( ref) ) == SQLITE_ROW else {
84
84
return nil
85
85
}
86
86
return SQLRow ( statement: self )
87
87
}
88
88
89
- #warning("TODO: document")
89
+ /// Executes the statement. Throws an error if an error is occured.
90
+ ///
91
+ /// - note: See [SQLite: Result and Error Codes](https://www.sqlite.org/rescode.html)
92
+ /// for more information.
90
93
@discardableResult
91
94
public func execute( ) throws -> SQLStatement {
92
95
try isOK ( sqlite3_step ( ref) )
You can’t perform that action at this time.
0 commit comments