Skip to content

Commit 3df9e8e

Browse files
committed
Merge branch 'development'
2 parents 13e1f4d + c98d918 commit 3df9e8e

File tree

15 files changed

+210
-160
lines changed

15 files changed

+210
-160
lines changed

.github/workflows/CI.yml

Lines changed: 14 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,9 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
include:
35-
- xcode: "Xcode_13.3.1.app"
35+
- xcode: "Xcode_14.0.1.app"
3636
runsOn: macOS-12
37-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
38-
shell: "/bin/zsh {0}"
39-
- xcode: "Xcode_13.2.1.app"
40-
runsOn: macOS-11
41-
name: "macOS 11, Xcode 13.2.1, Swift 5.5.2"
42-
shell: "/bin/zsh {0}"
43-
- xcode: "Xcode_13.1.app"
44-
runsOn: macOS-11
45-
name: "macOS 11, Xcode 13.1, Swift 5.5.1"
46-
shell: "/bin/zsh {0}"
47-
- xcode: "Xcode_13.0.app"
48-
runsOn: macOS-11
49-
name: "macOS 11, Xcode 13.0, Swift 5.5.0"
50-
shell: "/bin/zsh {0}"
51-
- xcode: "Xcode_12.5.1.app"
52-
runsOn: macOS-11
53-
name: "macOS 11, Xcode 12.5.1, Swift 5.4"
54-
shell: "/bin/zsh {0}"
55-
- xcode: "Xcode_12.4.app"
56-
runsOn: macOS-10.15
57-
name: "macOS 10.15, Xcode 12.4, Swift 5.3"
37+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
5838
shell: "/bin/zsh {0}"
5939
steps:
6040
- uses: actions/checkout@v3
@@ -68,13 +48,9 @@ jobs:
6848
fail-fast: false
6949
matrix:
7050
include:
71-
- xcode: "Xcode_13.3.1.app"
51+
- xcode: "Xcode_14.0.1.app"
7252
runsOn: macOS-12
73-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
74-
shell: "/bin/zsh {0}"
75-
- xcode: "Xcode_12.4.app"
76-
runsOn: macOS-10.15
77-
name: "macOS 10.15, Xcode 12.4, Swift 5.3"
53+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
7854
shell: "/bin/zsh {0}"
7955
steps:
8056
- uses: actions/checkout@v3
@@ -88,9 +64,9 @@ jobs:
8864
fail-fast: false
8965
matrix:
9066
include:
91-
- xcode: "Xcode_13.3.1.app"
67+
- xcode: "Xcode_14.0.1.app"
9268
runsOn: macOS-12
93-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
69+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
9470
shell: "/bin/zsh {0}"
9571
steps:
9672
- uses: actions/checkout@v3
@@ -104,9 +80,9 @@ jobs:
10480
fail-fast: false
10581
matrix:
10682
include:
107-
- xcode: "Xcode_13.3.1.app"
83+
- xcode: "Xcode_14.0.1.app"
10884
runsOn: macOS-12
109-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
85+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
11086
shell: "/bin/zsh {0}"
11187
steps:
11288
- uses: actions/checkout@v3
@@ -120,13 +96,9 @@ jobs:
12096
fail-fast: false
12197
matrix:
12298
include:
123-
- xcode: "Xcode_13.3.1.app"
99+
- xcode: "Xcode_14.0.1.app"
124100
runsOn: macOS-12
125-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
126-
shell: "/bin/zsh {0}"
127-
- xcode: "Xcode_12.4.app"
128-
runsOn: macOS-10.15
129-
name: "macOS 10.15, Xcode 12.4, Swift 5.3"
101+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
130102
shell: "/bin/zsh {0}"
131103
steps:
132104
- uses: actions/checkout@v3
@@ -140,13 +112,9 @@ jobs:
140112
fail-fast: false
141113
matrix:
142114
include:
143-
- xcode: "Xcode_13.3.1.app"
115+
- xcode: "Xcode_14.0.1.app"
144116
runsOn: macOS-12
145-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
146-
shell: "/bin/zsh {0}"
147-
- xcode: "Xcode_12.4.app"
148-
runsOn: macOS-10.15
149-
name: "macOS 10.15, Xcode 12.4, Swift 5.3"
117+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
150118
shell: "/bin/zsh {0}"
151119
steps:
152120
- uses: actions/checkout@v3
@@ -160,9 +128,9 @@ jobs:
160128
fail-fast: false
161129
matrix:
162130
include:
163-
- xcode: "Xcode_13.3.1.app"
131+
- xcode: "Xcode_14.0.1.app"
164132
runsOn: macOS-12
165-
name: "macOS 12, Xcode 13.3.1, Swift 5.6"
133+
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
166134
shell: "/bin/zsh {0}"
167135
steps:
168136
- uses: actions/checkout@v3

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
77

88
#### 6.x Releases
99

10+
- `6.2.x` Releases - [6.2.0](#620)
1011
- `6.1.x` Releases - [6.1.0](#610)
1112
- `6.0.x` Releases - [6.0.0](#600)
1213
- `6.0.0` Betas - [6.0.0-beta](#600-beta) | [6.0.0-beta.2](#600-beta2) | [6.0.0-beta.3](#600-beta3) | [6.0.0-beta.4](#600-beta4)
@@ -99,6 +100,13 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
99100

100101
---
101102

103+
## 6.2.0
104+
105+
Released October 28, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.1.0...v6.2.0)
106+
107+
- **New**: [#1289](https://github.com/groue/GRDB.swift/pull/1289) by [@arkie](https://github.com/arkie): Add support for passing in categories to the FTS5 unicode61 tokenizer (SQLite 3.25+)
108+
- **Fixed**: The `FTS5Tokenizer.tokenize(query:)` method no longer returns incorrect results for certain tokenizer arguments.
109+
102110
## 6.1.0
103111

104112
Released October 20, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.0.0...v6.1.0)

Documentation/FullTextSearch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil
304304
let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil
305305
```
306306

307-
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html):
307+
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html):
308308

309309
```swift
310310
let documents = try Document.fetchAll(db,
@@ -587,7 +587,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil
587587
let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil
588588
```
589589

590-
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html):
590+
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html):
591591

592592
```swift
593593
let documents = try Document.fetchAll(db,

Documentation/Migrations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ try dbQueue.read { db in
7777
}
7878
```
7979

80-
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/6.1/Structs/DatabaseMigrator.html) for more migrator methods.
80+
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/6.2/Structs/DatabaseMigrator.html) for more migrator methods.
8181

8282

8383
## The `eraseDatabaseOnSchemaChange` Option

GRDB.swift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'GRDB.swift'
3-
s.version = '6.1.0'
3+
s.version = '6.2.0'
44

55
s.license = { :type => 'MIT', :file => 'LICENSE' }
66
s.summary = 'A toolkit for SQLite databases, with a focus on application development.'

GRDB/Core/Row.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ extension Row {
198198
/// Returns true if the row contains null at given index.
199199
///
200200
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
201-
/// righmost column.
201+
/// rightmost column.
202202
///
203203
/// This method is equivalent to `row[index] == nil`, but may be preferred
204204
/// in performance-critical code because it can avoid decoding database
@@ -212,7 +212,7 @@ extension Row {
212212
/// stored at the given index.
213213
///
214214
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
215-
/// righmost column.
215+
/// rightmost column.
216216
public subscript(_ index: Int) -> (any DatabaseValueConvertible)? {
217217
_checkIndex(index)
218218
return impl.databaseValue(atUncheckedIndex: index).storage.value
@@ -221,7 +221,7 @@ extension Row {
221221
/// Returns the value at given index, converted to the requested type.
222222
///
223223
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
224-
/// righmost column.
224+
/// rightmost column.
225225
///
226226
/// For example:
227227
///
@@ -243,7 +243,7 @@ extension Row {
243243
/// Returns the value at given index, converted to the requested type.
244244
///
245245
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
246-
/// righmost column.
246+
/// rightmost column.
247247
///
248248
/// This method exists as an optimization opportunity for types that adopt
249249
/// ``StatementColumnConvertible``. It can trigger SQLite built-in
@@ -421,7 +421,7 @@ extension Row {
421421
/// Returns the optional `Data` at given index.
422422
///
423423
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
424-
/// righmost column.
424+
/// rightmost column.
425425
///
426426
/// If the SQLite value is NULL, the result is nil. If the SQLite value can
427427
/// not be converted to Data, a fatal error is raised.
@@ -679,7 +679,7 @@ extension Row {
679679
/// Returns the value at given index, converted to the requested type.
680680
///
681681
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
682-
/// righmost column.
682+
/// rightmost column.
683683
///
684684
/// If the SQLite value is NULL, or if the conversion fails, a
685685
/// `RowDecodingError` is thrown.
@@ -724,7 +724,7 @@ extension Row {
724724
/// Returns the value at given index, converted to the requested type.
725725
///
726726
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
727-
/// righmost column.
727+
/// rightmost column.
728728
///
729729
/// If the SQLite value is NULL, or if the conversion fails, a
730730
/// `RowDecodingError` is thrown.
@@ -788,7 +788,7 @@ extension Row {
788788
/// Returns the optional Data at given index.
789789
///
790790
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
791-
/// righmost column.
791+
/// rightmost column.
792792
///
793793
/// If the SQLite value is NULL, the result is nil. If the SQLite value can
794794
/// not be converted to Data, a `RowDecodingError` is thrown.
@@ -803,7 +803,7 @@ extension Row {
803803
/// Returns the Data at given index.
804804
///
805805
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
806-
/// righmost column.
806+
/// rightmost column.
807807
///
808808
/// If the SQLite value is NULL, or if the SQLite value can not be converted
809809
/// to Data, a `RowDecodingError` is thrown.

GRDB/Core/TransactionObserver.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension Database {
2121
// Drop cached statements that delete, because the addition of an
2222
// observer may change the need for truncate optimization prevention.
2323
publicStatementCache.removeAll { $0.isDeleteStatement }
24-
internalStatementCache.removeAll{ $0.isDeleteStatement }
24+
internalStatementCache.removeAll { $0.isDeleteStatement }
2525

2626
observationBroker.add(transactionObserver: transactionObserver, extent: extent)
2727
}
@@ -1158,7 +1158,7 @@ public struct DatabasePreUpdateEvent {
11581158
/// Returns the initial `DatabaseValue` at given index.
11591159
///
11601160
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
1161-
/// righmost column.
1161+
/// rightmost column.
11621162
///
11631163
/// The result is nil if the event is an .Insert event.
11641164
public func initialDatabaseValue(atIndex index: Int) -> DatabaseValue? {
@@ -1180,7 +1180,7 @@ public struct DatabasePreUpdateEvent {
11801180
/// Returns the final `DatabaseValue` at given index.
11811181
///
11821182
/// Indexes span from 0 for the leftmost column to (row.count - 1) for the
1183-
/// righmost column.
1183+
/// rightmost column.
11841184
///
11851185
/// The result is nil if the event is a .Delete event.
11861186
public func finalDatabaseValue(atIndex index: Int) -> DatabaseValue? {

GRDB/FTS/FTS5.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public struct FTS5: VirtualTableModule {
103103
if let tokenizer = definition.tokenizer {
104104
let tokenizerSQL = try tokenizer
105105
.components
106+
.map { component in
107+
try component.sqlExpression.quotedSQL(db)
108+
}
106109
.joined(separator: " ")
107110
.sqlExpression
108111
.quotedSQL(db)

0 commit comments

Comments
 (0)