You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -99,9 +100,11 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
99
100
100
101
---
101
102
102
-
## Next Release
103
+
## 6.2.0
103
104
104
-
- **New**: [#1289](https://github.com/groue/GRDB.swift/pull/1289) by [@arkie](https://github.com/arkie): Add support for passing in categories to the unicode61 tokenizer
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+)
105
108
- **Fixed**: The `FTS5Tokenizer.tokenize(query:)` method no longer returns incorrect results for certain tokenizer arguments.
let pattern =FTS3Pattern(matchingAnyTokenIn: "*") // nil
305
305
```
306
306
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):
let pattern =FTS5Pattern(matchingAnyTokenIn: "*") // nil
588
588
```
589
589
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):
| Swift 5.3 |[v5.26.1](https://github.com/groue/GRDB.swift/tree/v5.26.1)|
24
22
| Swift 5.2 |[v5.12.0](https://github.com/groue/GRDB.swift/tree/v5.12.0)|
25
23
| Swift 5.1 |[v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0)|
@@ -324,7 +322,7 @@ Documentation
324
322
325
323
#### Reference
326
324
327
-
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/6.1/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
325
+
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/6.2/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
328
326
329
327
#### Getting Started
330
328
@@ -618,7 +616,7 @@ do {
618
616
619
617
> **Warning**: It is your responsibility to prevent sensitive information from leaking in unexpected locations, so you should not set the `publicStatementArguments` flag in release builds (think about GDPR and other privacy-related rules).
620
618
621
-
See [Configuration](http://groue.github.io/GRDB.swift/docs/6.1/Structs/Configuration.html) for more details and configuration options.
619
+
See [Configuration](http://groue.github.io/GRDB.swift/docs/6.2/Structs/Configuration.html) for more details and configuration options.
622
620
623
621
624
622
SQLite API
@@ -675,7 +673,7 @@ try dbQueue.write { db in
675
673
}
676
674
```
677
675
678
-
The `?` and colon-prefixed keys like `:score` in the SQL query are the **statements arguments**. You pass arguments with arrays or dictionaries, as in the example above. See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
676
+
The `?` and colon-prefixed keys like `:score` in the SQL query are the **statements arguments**. You pass arguments with arrays or dictionaries, as in the example above. See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
679
677
680
678
You can also embed query arguments right into your SQL queries, with the `literal` argument label, as in the example below. See [SQL Interpolation] for more details.
681
679
@@ -933,7 +931,7 @@ try dbQueue.read { db in
933
931
let dictionary =tryDictionary(uniqueKeysWithValues: cursor)
934
932
```
935
933
936
-
-**Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/6.1/Protocols/Cursor.html) protocol, which looks a lot like standard [lazy sequences](https://developer.apple.com/reference/swift/lazysequenceprotocol) of Swift.** As such, cursors come with many convenience methods: `compactMap`, `contains`, `dropFirst`, `dropLast`, `drop(while:)`, `enumerated`, `filter`, `first`, `flatMap`, `forEach`, `joined`, `joined(separator:)`, `max`, `max(by:)`, `min`, `min(by:)`, `map`, `prefix`, `prefix(while:)`, `reduce`, `reduce(into:)`, `suffix`:
934
+
-**Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/6.2/Protocols/Cursor.html) protocol, which looks a lot like standard [lazy sequences](https://developer.apple.com/reference/swift/lazysequenceprotocol) of Swift.** As such, cursors come with many convenience methods: `compactMap`, `contains`, `dropFirst`, `dropLast`, `drop(while:)`, `enumerated`, `filter`, `first`, `flatMap`, `forEach`, `joined`, `joined(separator:)`, `max`, `max(by:)`, `min`, `min(by:)`, `map`, `prefix`, `prefix(while:)`, `reduce`, `reduce(into:)`, `suffix`:
937
935
938
936
```swift
939
937
// Prints all Github links
@@ -1012,7 +1010,7 @@ let rows = try Row.fetchAll(db,
1012
1010
arguments: ["name":"Arthur"])
1013
1011
```
1014
1012
1015
-
See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
1013
+
See [Values](#values) for more information on supported arguments types (Bool, Int, String, Date, Swift enums, etc.), and [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
1016
1014
1017
1015
Unlike row arrays that contain copies of the database rows, row cursors are close to the SQLite metal, and require a little care:
1018
1016
@@ -1320,7 +1318,7 @@ GRDB ships with built-in support for the following value types:
1320
1318
1321
1319
- Generally speaking, all types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol.
1322
1320
1323
-
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html):
1321
+
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html):
1324
1322
1325
1323
```swift
1326
1324
let url: URL =...
@@ -1791,7 +1789,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction
1791
1789
}
1792
1790
```
1793
1791
1794
-
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/6.1/Structs/Configuration.html) configuration flag:
1792
+
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/6.2/Structs/Configuration.html) configuration flag:
1795
1793
1796
1794
```swift
1797
1795
// fatal error: A transaction has been left opened at the end of a database access
@@ -1903,7 +1901,7 @@ try dbQueue.write { db in
1903
1901
}
1904
1902
```
1905
1903
1906
-
The `?` and colon-prefixed keys like `:name` in the SQL query are the statement arguments. You set them with arrays or dictionaries (arguments are actually of type [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
1904
+
The `?` and colon-prefixed keys like `:name` in the SQL query are the statement arguments. You set them with arrays or dictionaries (arguments are actually of type [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
See [fetching methods](#fetching-methods) for information about the `fetchCursor`, `fetchAll`, `fetchSet` and `fetchOne` methods. See [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html) for more information about the query arguments.
2731
+
See [fetching methods](#fetching-methods) for information about the `fetchCursor`, `fetchAll`, `fetchSet` and `fetchOne` methods. See [StatementArguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html) for more information about the query arguments.
2734
2732
2735
2733
>**Note**:for performance reasons, the same row argument to `init(row:)` is reused during the iteration of a fetch query. If you want to keep the row for later use, make sure to store a copy: `self.row = row.copy()`.
2736
2734
@@ -3240,7 +3238,7 @@ Here is a list with all the available [persistence callbacks], listed in the sam
3240
3238
- `aroundDelete`
3241
3239
- `didDelete`
3242
3240
3243
-
For detailed information about each callback, check the [reference](http://groue.github.io/GRDB.swift/docs/6.1/Protocols/MutablePersistableRecord.html).
3241
+
For detailed information about each callback, check the [reference](http://groue.github.io/GRDB.swift/docs/6.2/Protocols/MutablePersistableRecord.html).
3244
3242
3245
3243
In the `MutablePersistableRecord` protocol, `willInsert` and `didInsert` are mutating methods. In `PersistableRecord`, they are not mutating.
3246
3244
@@ -3433,7 +3431,7 @@ protocol EncodableRecord {
3433
3431
}
3434
3432
```
3435
3433
3436
-
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.1/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.1/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3434
+
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.2/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.2/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3437
3435
3438
3436
3439
3437
### Date and UUID Coding Strategies
@@ -3455,7 +3453,7 @@ protocol EncodableRecord {
3455
3453
}
3456
3454
```
3457
3455
3458
-
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.1/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.1/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.1/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3456
+
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.2/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.2/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.2/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3459
3457
3460
3458
There is no customization of uuid decoding, because UUID can already decode all its encoded variants (16-bytes blobs and uuid strings, both uppercase and lowercase).
3461
3459
@@ -5015,7 +5013,7 @@ Player // SELECT * FROM player
5015
5013
```
5016
5014
5017
5015
5018
-
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/6.1/Structs/StatementArguments.html):
5016
+
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/6.2/Structs/StatementArguments.html):
5019
5017
5020
5018
```swift
5021
5019
// SELECT DATE(creationDate), COUNT(*) FROM player WHERE name = 'Arthur' GROUP BY date(creationDate)
- The `adapted(_:)` method eases the consumption of complex rows with [row adapters](#row-adapters). See [Joined Queries Support](#joined-queries-support) for some sample code that uses this method.
5923
5921
5924
-
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/6.1/Structs/AnyFetchRequest.html): a type-erased request.
5922
+
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/6.2/Structs/AnyFetchRequest.html): a type-erased request.
For example, if you observe the region of `Player.select(max(Column("score")))`, then you'll get be notified of all changes performed on the `score` column of the `player` table (updates, insertions and deletions), even if they do not modify the value of the maximum score. However, you will not get any notification for changes performed on other database tables, or updates to other columns of the player table.
7256
7254
7257
-
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/6.1/Structs/DatabaseRegion.html).
7255
+
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/6.2/Structs/DatabaseRegion.html).
7258
7256
7259
7257
7260
7258
#### The DatabaseRegionConvertible Protocol
@@ -8618,7 +8616,7 @@ When this is the case, there are two possible explanations:
8618
8616
try db.execute(sql: "UPDATE player SET name = ?", arguments: [name])
8619
8617
```
8620
8618
8621
-
For more information, see [Double-quoted String Literals Are Accepted](https://sqlite.org/quirks.html#dblquote), and [Configuration.acceptsDoubleQuotedStringLiterals](http://groue.github.io/GRDB.swift/docs/6.1/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8619
+
For more information, see [Double-quoted String Literals Are Accepted](https://sqlite.org/quirks.html#dblquote), and [Configuration.acceptsDoubleQuotedStringLiterals](http://groue.github.io/GRDB.swift/docs/6.2/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8622
8620
8623
8621
8624
8622
@@ -8767,7 +8765,7 @@ This chapter has [moved](Documentation/Concurrency.md#database-snapshots).
8767
8765
8768
8766
#### DatabaseWriter and DatabaseReader Protocols
8769
8767
8770
-
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/6.1/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/6.1/Protocols/DatabaseWriter.html).
8768
+
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/6.2/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/6.2/Protocols/DatabaseWriter.html).
8771
8769
8772
8770
#### Asynchronous APIs
8773
8771
@@ -8821,7 +8819,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests].
8821
8819
[Sharing a Database]: Documentation/SharingADatabase.md
0 commit comments