Skip to content

Commit cc9344c

Browse files
committed
Playground cleanup
Just a little bit of editing. Signed-off-by: Stephen Celis <[email protected]>
1 parent 300fe42 commit cc9344c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

SQLite.playground/Documentation/fragment-3.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta id='xcode-display' name='xcode-display' content='render'>
55
<section>
66
<p>
7-
Prepared statements can bind and escape input values safely. In this case, both <code>email</code> and <code>admin</code> column values are marked and bound with different values over two executions.
7+
Prepared statements can bind and escape input values safely. In this case, both <code>email</code> and <code>admin</code> columns are bound with different values over two executions.
88
</p>
99
<p>
1010
The <code>Database</code> class exposes information about recently run queries via several properties: <code>totalChanges</code> returns the total number of changes (inserts, updates, and deletes) since the connection was opened; <code>lastChanges</code> returns the number of changes from the last executed statement that modified the database; <code>lastID</code> returns the row ID of the last insert.

SQLite.playground/Documentation/fragment-4.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<section>
66
<h3>Querying</h3>
77
<p>
8-
<code>Statement</code> objects act as Swift sequences <em>and</em> generators. We can iterate over a select statement’s rows directly using a <code>for</code><code>in</code> loop.
8+
<code>Statement</code> objects act as both sequences <em>and</em> generators. We can iterate over a select statement’s rows directly using a <code>for</code><code>in</code> loop.
99
</p>
1010
</section>

SQLite.playground/Documentation/fragment-6.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ <h4>Experiment</h4>
1414
</aside>
1515
<h3>Transactions &amp; Savepoints</h3>
1616
<p>
17-
Using the <code>transaction</code> and <code>savepoint</code> functions, we can run a series of statements, commiting the changes to the database if all succeed, or bailing out early and rolling back on failure. In the following example we prepare two statements: one to insert a manager into the database, and one—given a manager’s row ID—to insert a managed user into the database.
17+
Using the <code>transaction</code> and <code>savepoint</code> functions, we can run a series of statements, commiting the changes to the database if they all succeed. If a single statement fails, we bail out early and roll back. In the following example we prepare two statements: one to insert a manager into the database, and one—given a manager’s row ID—to insert a managed user into the database.
1818
</p>
1919
</section>

SQLite.playground/Documentation/fragment-8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<meta id='xcode-display' name='xcode-display' content='render'>
55
<section>
66
<p>
7-
Our database has a uniqueness constraint on email address, so let’s try inserting Fiona, who also claims to be managing Emery.
7+
Our database has a uniqueness constraint on email address, so let’s see what happens when we insert Fiona, who also claims to be managing Emery.
88
</p>
99
</section>

SQLite.playground/section-10.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
for row in db.prepare("SELECT id, email FROM users") {
2-
println(row)
2+
println("id: \(row[0]), email: \(row[1])")
33
}

0 commit comments

Comments
 (0)