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
@@ -137,6 +138,16 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
137
138
138
139
---
139
140
141
+
## 7.6.0
142
+
143
+
Released July 20, 2025
144
+
145
+
- **New**: All closures that accept DatabaseComponents can throw by [@groue](https://github.com/groue) in [#1768](https://github.com/groue/GRDB.swift/pull/1768)
146
+
- **New**: Add Sendable conformance to DatabasePreUpdateEvent.Kind, matching DatabaseEvent.Kind by [@Jason-Abbott](https://github.com/Jason-Abbott) in [#1773](https://github.com/groue/GRDB.swift/pull/1773)
147
+
- **New**: Add custom build instruction for hardened runtime by [@Jason-Abbott](https://github.com/Jason-Abbott) in [#1776](https://github.com/groue/GRDB.swift/pull/1776)
148
+
- **New**: Access task locals from asynchronous database accesses by [@groue](https://github.com/groue) in [#1794](https://github.com/groue/GRDB.swift/pull/1794)
149
+
- **New**: Throwing row accessors by [@groue](https://github.com/groue) in [#1796](https://github.com/groue/GRDB.swift/pull/1796)
When you extract a record instead of a value from a row, GRDB looks up the tree of **association keys**. If the key is not found, or only associated with columns that all contain NULL values, an optional record is decoded asnil:
2204
+
If the key is not found, or only associated with columns that are all NULL, an optional record is decoded asnil:
2205
2205
2206
2206
```swift
2207
-
let author: Author = row["author"]
2208
-
let country: Country?= row["country"]
2207
+
let country =try row.decodeIfPresent(Country.self, forKey: "country")
2209
2208
```
2210
2209
2211
2210
You can also perform custom navigation in the tree by using *row scopes*. See [Row Adapters] for more information.
Copy file name to clipboardExpand all lines: Documentation/CustomSQLiteBuilds.md
+30-26Lines changed: 30 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,47 +12,47 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal
12
12
**To install GRDB with a custom SQLite build:**
13
13
14
14
1. Clone the GRDB git repository, checkout the latest tagged version:
15
-
15
+
16
16
```sh
17
17
cd [GRDB directory]
18
18
git checkout [latest tag]
19
19
git submodule update --init SQLiteCustom/src
20
20
```
21
-
21
+
22
22
2. Choose your [extra compilation options](https://www.sqlite.org/compile.html). For example, `SQLITE_ENABLE_FTS5`, `SQLITE_ENABLE_PREUPDATE_HOOK`.
23
-
23
+
24
24
It is recommended that you enable the `SQLITE_ENABLE_SNAPSHOT` option. It allows GRDB to optimize [ValueObservation](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation) when you use a [Database Pool](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasepool).
25
25
26
26
3. Create a folder named `GRDBCustomSQLite` somewhere in your project directory.
27
27
28
28
4. Create four files in the `GRDBCustomSQLite` folder:
29
29
30
30
- `SQLiteLib-USER.xcconfig`: this file sets the extra SQLite compilation flags.
31
-
31
+
32
32
```xcconfig
33
33
// As many -D options as there are custom SQLite compilation options
34
34
// Note: there is no space between -D and the option name.
Modify the top of `GRDBCustomSQLite-INSTALL.sh` file so that it contains correct paths.
111
111
112
112
5. Embed the `GRDBCustom.xcodeproj` project in your own project.
@@ -116,17 +116,21 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal
116
116
7. Add the `GRDBCustom.framework` from the targeted platform to the **Embedded Binaries** section of the **General** tab of your **application target**.
117
117
118
118
8. Add a Run Script phase foryour targetin the **Pre-actions** section of the **Build** tab of your **application scheme**:
The path should be the path to your `GRDBCustomSQLite-INSTALL.sh` file.
125
-
125
+
126
126
Select your application target in the "Provide build settings from" menu.
127
127
128
128
9. Check the "Shared" checkbox of your application scheme (this lets you commit the pre-action in your Version Control System).
129
129
130
+
10. If you have enabled "Hardened Runtime"for your target (**Build Settings**/**Signing**) then you may need to check **Disable Library Validation** under the **Hardened Runtime** section of the **Signing & Capabilities** tab.
131
+
132
+
(The build error without this exception is "Library not loaded ... different Team IDs")
133
+
130
134
Now you can use GRDB with your custom SQLite build:
0 commit comments