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
@@ -97,7 +98,9 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
97
98
98
99
---
99
100
100
-
## Next Release
101
+
## 6.0.0
102
+
103
+
Released September 9, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.0.0-beta.4...v6.0.0)
101
104
102
105
- **New**: Bump custom SQLite builds v3.39.3
103
106
- **Fixed**: [#1274](https://github.com/groue/GRDB.swift/discussions/1274) Fixed a bug with HasManyThrough associations when the "through" association has the same association key as the association itself.
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.0.0-beta.4/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.0/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.0.0-beta.4/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.0/Structs/StatementArguments.html):
| Swift 5.3 |[v5.26.0](https://github.com/groue/GRDB.swift/tree/v5.26.0)|
22
24
| Swift 5.2 |[v5.12.0](https://github.com/groue/GRDB.swift/tree/v5.12.0)|
23
25
| Swift 5.1 |[v4.14.0](https://github.com/groue/GRDB.swift/tree/v4.14.0)|
@@ -322,7 +324,7 @@ Documentation
322
324
323
325
#### Reference
324
326
325
-
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
327
+
-[GRDB Reference](http://groue.github.io/GRDB.swift/docs/6.0/index.html) (generated by [Jazzy](https://github.com/realm/jazzy))
326
328
327
329
#### Getting Started
328
330
@@ -616,7 +618,7 @@ do {
616
618
617
619
> **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).
618
620
619
-
See [Configuration](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Structs/Configuration.html) for more details and configuration options.
621
+
See [Configuration](http://groue.github.io/GRDB.swift/docs/6.0/Structs/Configuration.html) for more details and configuration options.
620
622
621
623
622
624
SQLite API
@@ -673,7 +675,7 @@ try dbQueue.write { db in
673
675
}
674
676
```
675
677
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.0.0-beta.4/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
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.0/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
677
679
678
680
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.
679
681
@@ -931,7 +933,7 @@ try dbQueue.read { db in
931
933
let dictionary =tryDictionary(uniqueKeysWithValues: cursor)
932
934
```
933
935
934
-
-**Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/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`:
936
+
-**Cursors adopt the [Cursor](http://groue.github.io/GRDB.swift/docs/6.0/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`:
935
937
936
938
```swift
937
939
// Prints all Github links
@@ -1010,7 +1012,7 @@ let rows = try Row.fetchAll(db,
1010
1012
arguments: ["name":"Arthur"])
1011
1013
```
1012
1014
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.0.0-beta.4/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
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.0/Structs/StatementArguments.html) for a detailed documentation of SQLite arguments.
1014
1016
1015
1017
Unlike row arrays that contain copies of the database rows, row cursors are close to the SQLite metal, and require a little care:
1016
1018
@@ -1318,7 +1320,7 @@ GRDB ships with built-in support for the following value types:
1318
1320
1319
1321
- Generally speaking, all types that adopt the [DatabaseValueConvertible](#custom-value-types) protocol.
1320
1322
1321
-
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Structs/StatementArguments.html):
1323
+
Values can be used as [statement arguments](http://groue.github.io/GRDB.swift/docs/6.0/Structs/StatementArguments.html):
1322
1324
1323
1325
```swift
1324
1326
let url: URL =...
@@ -1789,7 +1791,7 @@ try dbQueue.inDatabase { db in // or dbPool.writeWithoutTransaction
1789
1791
}
1790
1792
```
1791
1793
1792
-
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Structs/Configuration.html) configuration flag:
1794
+
Transactions can't be left opened unless you set the [allowsUnsafeTransactions](http://groue.github.io/GRDB.swift/docs/6.0/Structs/Configuration.html) configuration flag:
1793
1795
1794
1796
```swift
1795
1797
// fatal error: A transaction has been left opened at the end of a database access
@@ -1901,7 +1903,7 @@ try dbQueue.write { db in
1901
1903
}
1902
1904
```
1903
1905
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.0.0-beta.4/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
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.0/Structs/StatementArguments.html), which happens to adopt the ExpressibleByArrayLiteral and ExpressibleByDictionaryLiteral protocols).
@@ -1984,7 +1986,7 @@ See also `Database.execute(sql:)` in the [Executing Updates](#executing-updates)
1984
1986
1985
1987
>**Note**: it is a programmer error to reuse a prepared statement that has failed: GRDB may crash if you do so.
1986
1988
1987
-
For more information about prepared statements, see the [Statement reference](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Classes/Statement.html).
1989
+
For more information about prepared statements, see the [Statement reference](http://groue.github.io/GRDB.swift/docs/6.0/Classes/Statement.html).
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.0.0-beta.4/Structs/StatementArguments.html) for more information about the query arguments.
2733
+
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.0/Structs/StatementArguments.html) for more information about the query arguments.
2732
2734
2733
2735
>**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()`.
2734
2736
@@ -3238,7 +3240,7 @@ Here is a list with all the available [persistence callbacks], listed in the sam
3238
3240
- `aroundDelete`
3239
3241
- `didDelete`
3240
3242
3241
-
For detailed information about each callback, check the [reference](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Protocols/MutablePersistableRecord.html).
3243
+
For detailed information about each callback, check the [reference](http://groue.github.io/GRDB.swift/docs/6.0/Protocols/MutablePersistableRecord.html).
3242
3244
3243
3245
In the `MutablePersistableRecord` protocol, `willInsert` and `didInsert` are mutating methods. In `PersistableRecord`, they are not mutating.
3244
3246
@@ -3431,7 +3433,7 @@ protocol EncodableRecord {
3431
3433
}
3432
3434
```
3433
3435
3434
-
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3436
+
See [DatabaseColumnDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0/Enums/DatabaseColumnDecodingStrategy.html) and [DatabaseColumnEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0/Enums/DatabaseColumnEncodingStrategy.html) to learn about all available strategies.
3435
3437
3436
3438
3437
3439
### Date and UUID Coding Strategies
@@ -3453,7 +3455,7 @@ protocol EncodableRecord {
3453
3455
}
3454
3456
```
3455
3457
3456
-
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3458
+
See [DatabaseDateDecodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0/Enums/DatabaseDateDecodingStrategy.html), [DatabaseDateEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0/Enums/DatabaseDateEncodingStrategy.html), and [DatabaseUUIDEncodingStrategy](https://groue.github.io/GRDB.swift/docs/6.0/Enums/DatabaseUUIDEncodingStrategy.html) to learn about all available strategies.
3457
3459
3458
3460
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).
3459
3461
@@ -5013,7 +5015,7 @@ Player // SELECT * FROM player
5013
5015
```
5014
5016
5015
5017
5016
-
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Structs/StatementArguments.html):
5018
+
Raw SQL snippets are also accepted, with eventual [arguments](http://groue.github.io/GRDB.swift/docs/6.0/Structs/StatementArguments.html):
5017
5019
5018
5020
```swift
5019
5021
// 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.
5921
5923
5922
-
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Structs/AnyFetchRequest.html): a type-erased request.
5924
+
- [AnyFetchRequest](http://groue.github.io/GRDB.swift/docs/6.0/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.
7254
7256
7255
-
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Structs/DatabaseRegion.html).
7257
+
For more details, see the [reference](https://groue.github.io/GRDB.swift/docs/6.0/Structs/DatabaseRegion.html).
7256
7258
7257
7259
7258
7260
#### The DatabaseRegionConvertible Protocol
@@ -8616,7 +8618,7 @@ When this is the case, there are two possible explanations:
8616
8618
try db.execute(sql: "UPDATE player SET name = ?", arguments: [name])
8617
8619
```
8618
8620
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.0.0-beta.4/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
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.0/Structs/Configuration.html#/s:4GRDB13ConfigurationV33acceptsDoubleQuotedStringLiteralsSbvp).
8620
8622
8621
8623
8622
8624
@@ -8765,7 +8767,7 @@ This chapter has [moved](Documentation/Concurrency.md#database-snapshots).
8765
8767
8766
8768
#### DatabaseWriter and DatabaseReader Protocols
8767
8769
8768
-
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/6.0.0-beta.4/Protocols/DatabaseWriter.html).
8770
+
This chapter was removed. See the references of [DatabaseReader](http://groue.github.io/GRDB.swift/docs/6.0/Protocols/DatabaseReader.html) and [DatabaseWriter](http://groue.github.io/GRDB.swift/docs/6.0/Protocols/DatabaseWriter.html).
8769
8771
8770
8772
#### Asynchronous APIs
8771
8773
@@ -8819,7 +8821,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests].
8819
8821
[Sharing a Database]: Documentation/SharingADatabase.md
0 commit comments