Skip to content

Commit 1011098

Browse files
committed
Update docs
1 parent b028fcd commit 1011098

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- name: "Select Xcode"
12+
# Currently only works with Xcode 14.2:
13+
# https://github.com/CocoaPods/CocoaPods/issues/11839
1214
run: |
1315
xcode-select -p
1416
sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.15.0 (unreleased)
2+
========================================
3+
4+
* New minimum deployment targets: iOS/tvOS 11.0, watchOS 4.0
5+
16
0.14.1 (01-11-2022), [diff][diff-0.14.1]
27
========================================
38

Documentation/Index.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@
7777

7878
## Installation
7979

80-
> _Note:_ SQLite.swift requires Swift 5 (and
81-
> [Xcode 10.2](https://developer.apple.com/xcode/downloads/)) or greater.
82-
8380
### Swift Package Manager
8481

8582
The [Swift Package Manager][] is a tool for managing the distribution of
@@ -1142,11 +1139,11 @@ let query = managers
11421139
chain.with(chain, recursive: true, as: query)
11431140
// WITH RECURSIVE
11441141
// "chain" AS (
1145-
// SELECT * FROM "managers" WHERE "id" = 8
1146-
// UNION
1147-
// SELECT * from "chain"
1142+
// SELECT * FROM "managers" WHERE "id" = 8
1143+
// UNION
1144+
// SELECT * from "chain"
11481145
// JOIN "managers" ON "chain"."manager_id" = "managers"."id"
1149-
// )
1146+
// )
11501147
// SELECT * FROM "chain"
11511148
```
11521149
@@ -1156,7 +1153,7 @@ Column names and a materialization hint can optionally be provided.
11561153
// Add a "level" column to the query representing manager's position in the chain
11571154
let level = Expression<Int64>("level")
11581155

1159-
let queryWithLevel =
1156+
let queryWithLevel =
11601157
managers
11611158
.select(id, managerId, 0)
11621159
.where(id == 8)
@@ -1166,18 +1163,18 @@ let queryWithLevel =
11661163
.join(managers, on: chain[managerId] == managers[id])
11671164
)
11681165

1169-
chain.with(chain,
1170-
columns: [id, managerId, level],
1166+
chain.with(chain,
1167+
columns: [id, managerId, level],
11711168
recursive: true,
11721169
hint: .materialize,
11731170
as: queryWithLevel)
11741171
// WITH RECURSIVE
11751172
// "chain" ("id", "manager_id", "level") AS MATERIALIZED (
1176-
// SELECT ("id", "manager_id", 0) FROM "managers" WHERE "id" = 8
1177-
// UNION
1178-
// SELECT ("manager"."id", "manager"."manager_id", "level" + 1) FROM "chain"
1173+
// SELECT ("id", "manager_id", 0) FROM "managers" WHERE "id" = 8
1174+
// UNION
1175+
// SELECT ("manager"."id", "manager"."manager_id", "level" + 1) FROM "chain"
11791176
// JOIN "managers" ON "chain"."manager_id" = "managers"."id"
1180-
// )
1177+
// )
11811178
// SELECT * FROM "chain"
11821179
```
11831180

@@ -1266,7 +1263,7 @@ let count = try db.scalar(users.filter(name != nil).count)
12661263
We can upsert rows into a table by calling a [query’s](#queries) `upsert`
12671264
function with a list of [setters](#setters)—typically [typed column
12681265
expressions](#expressions) and values (which can also be expressions)—each
1269-
joined by the `<-` operator. Upserting is like inserting, except if there is a
1266+
joined by the `<-` operator. Upserting is like inserting, except if there is a
12701267
conflict on the specified column value, SQLite will perform an update on the row instead.
12711268

12721269
```swift
@@ -1957,7 +1954,7 @@ for row in stmt.bind(kUTTypeImage) { /* ... */ }
19571954
```
19581955

19591956
> _Note:_ Prepared queries can be reused, and long lived prepared queries should be `reset()` after each use. Otherwise, the transaction (either [implicit or explicit](https://www.sqlite.org/lang_transaction.html#implicit_versus_explicit_transactions)) will be held open until the query is reset or finalized. This can affect performance. Statements are reset automatically during `deinit`.
1960-
>
1957+
>
19611958
> ```swift
19621959
> someObj.statement = try db.prepare("SELECT * FROM attachments WHERE typeConformsTo(UTI, ?)")
19631960
> for row in someObj.statement.bind(kUTTypeImage) { /* ... */ }
@@ -2134,7 +2131,7 @@ using the following functions.
21342131
}
21352132
}
21362133
```
2137-
2134+
21382135
- `run` prepares a single `Statement` object from a SQL string, optionally
21392136
binds values to it (using the statement’s `bind` function), executes,
21402137
and returns the statement.

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ API.
9090
// Wrap everything in a do...catch to handle errors
9191
do {
9292
// ...
93-
93+
9494
let stmt = try db.prepare("INSERT INTO users (email) VALUES (?)")
9595
for email in ["[email protected]", "[email protected]"] {
9696
try stmt.run(email)
@@ -119,9 +119,6 @@ interactively, from the Xcode project’s playground.
119119

120120
## Installation
121121

122-
> _Note:_ Version 0.11.6 and later requires Swift 5 (and [Xcode](https://developer.apple.com/xcode/downloads/) 10.2) or greater.
123-
> Version 0.11.5 requires Swift 4.2 (and [Xcode](https://developer.apple.com/xcode/downloads/) 10.1) or greater.
124-
125122
### Swift Package Manager
126123

127124
The [Swift Package Manager][] is a tool for managing the distribution of

0 commit comments

Comments
 (0)