Skip to content

Commit 1b4daa2

Browse files
committed
Merge branch 'master' of https://github.com/kean/SwiftSQL
2 parents fd04099 + ecffda1 commit 1b4daa2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
**SwiftSQLExt** introduces some basic conveniences on top of it.
1111

12-
SwiftSQL was created for [Pulse](https://github.com/kean/Pulse) where it is embedded internally. The entire library is just 300 lines of code, but it gets you 80% there.
12+
SwiftSQL was created for [Pulse](https://github.com/kean/Pulse) where it is embedded internally. The entire library fits just under 300 lines of code, but gets you 80% there.
1313

1414
<br/>
1515

@@ -23,7 +23,7 @@ To start reading or writing to a database, you need to open a connection.
2323
let db = try SQLConnection(url: storeURL)
2424
```
2525

26-
By default, the database is opened in readwrite mode and is created if it doesn't exist.
26+
By default, the database is opened in readwrite mode and is created if it doesn't exist. `SQLConnection` has multiple options for opening the database.
2727

2828
### `SQLStatement`
2929

@@ -38,7 +38,6 @@ The life-cycle of a prepared statement object usually goes like this:
3838
1. Create the prepared statement object using a connection:
3939

4040
```swift
41-
let db = try SQLConnection(url: storeURL)
4241
let statement = try db.prepare("""
4342
INSERT INTO Users (Name, Surname)
4443
VALUES (?, ?)
@@ -56,8 +55,8 @@ try statement.bind("John", "Appleseed")
5655
3. Execute the statement.
5756

5857
```swift
59-
// Use `step()` to execute a statement
60-
try statement.step()
58+
// Use `execute()` to execute a statement
59+
try statement.execute()
6160

6261
// If the statement returns multiple SQL rows, you can step in a loop
6362
// and use `column()` family of methods to retrieve values for the current row.

0 commit comments

Comments
 (0)