Skip to content

Commit c3cc998

Browse files
committed
Merge branch 'development'
2 parents 7b63ddf + 0f0f33d commit c3cc998

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1051
-976
lines changed

.github/workflows/CI.yml

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
2+
13
name: "GRDB CI"
24

35
on:
@@ -9,12 +11,14 @@ on:
911
- 'GRDB/**'
1012
- 'Tests/**'
1113
- '.github/workflows/**'
14+
- 'Makefile'
1215
- 'Package.swift'
1316
pull_request:
1417
paths:
1518
- 'GRDB/**'
1619
- 'Tests/**'
1720
- '.github/workflows/**'
21+
- 'Makefile'
1822
- 'Package.swift'
1923

2024
concurrency:
@@ -24,114 +28,124 @@ permissions:
2428
contents: read
2529

2630
jobs:
27-
macOS:
28-
name: macOS
31+
Framework:
32+
name: Framework
2933
runs-on: ${{ matrix.runsOn }}
34+
env:
35+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
3036
timeout-minutes: 60
3137
strategy:
3238
fail-fast: false
3339
matrix:
3440
include:
41+
- xcode: "Xcode_14.1.app"
42+
runsOn: macOS-12
43+
destination: "platform=macOS"
44+
name: "macOS"
45+
- xcode: "Xcode_14.1.app"
46+
runsOn: macOS-12
47+
destination: "OS=16.1,name=iPhone 14"
48+
name: "iOS"
49+
- xcode: "Xcode_14.1.app"
50+
runsOn: macOS-12
51+
destination: "OS=16.1,name=Apple TV"
52+
name: "tvOS"
3553
- xcode: "Xcode_14.0.1.app"
3654
runsOn: macOS-12
37-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
38-
shell: "/bin/zsh {0}"
39-
steps:
40-
- uses: actions/checkout@v3
41-
- name: ${{ matrix.name }}
42-
run: make test_framework_GRDBOSX_maxSwift
43-
iOS:
44-
name: iOS
45-
runs-on: ${{ matrix.runsOn }}
46-
timeout-minutes: 60
47-
strategy:
48-
fail-fast: false
49-
matrix:
50-
include:
55+
destination: "platform=macOS"
56+
name: "macOS"
5157
- xcode: "Xcode_14.0.1.app"
5258
runsOn: macOS-12
53-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
54-
shell: "/bin/zsh {0}"
59+
destination: "OS=16.0,name=iPhone 14"
60+
name: "iOS"
5561
steps:
5662
- uses: actions/checkout@v3
5763
- name: ${{ matrix.name }}
58-
run: make test_framework_GRDBiOS_maxTarget_maxSwift
64+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project GRDB.xcodeproj -scheme GRDB -destination "${{ matrix.destination }}" OTHER_SWIFT_FLAGS='$(inherited) -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK' GCC_PREPROCESSOR_DEFINITIONS='$(inherited) GRDB_SQLITE_ENABLE_PREUPDATE_HOOK=1' clean test
5965
SPM:
6066
name: SPM
6167
runs-on: ${{ matrix.runsOn }}
68+
env:
69+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
6270
timeout-minutes: 60
6371
strategy:
6472
fail-fast: false
6573
matrix:
6674
include:
75+
- xcode: "Xcode_14.1.app"
76+
runsOn: macOS-12
77+
name: "Xcode 14.1"
6778
- xcode: "Xcode_14.0.1.app"
6879
runsOn: macOS-12
69-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
70-
shell: "/bin/zsh {0}"
80+
name: "Xcode 14.0.1"
7181
steps:
7282
- uses: actions/checkout@v3
7383
- name: ${{ matrix.name }}
7484
run: make test_SPM test_install_SPM
7585
SQLCipher3:
7686
name: SQLCipher3
7787
runs-on: ${{ matrix.runsOn }}
88+
env:
89+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
7890
timeout-minutes: 60
7991
strategy:
8092
fail-fast: false
8193
matrix:
8294
include:
83-
- xcode: "Xcode_14.0.1.app"
95+
- xcode: "Xcode_14.1.app"
8496
runsOn: macOS-12
85-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
86-
shell: "/bin/zsh {0}"
97+
name: "Xcode 14.1"
8798
steps:
8899
- uses: actions/checkout@v3
89100
- name: ${{ matrix.name }}
90101
run: make test_framework_SQLCipher3Encrypted
91102
SQLCipher4:
92103
name: SQLCipher4
93104
runs-on: ${{ matrix.runsOn }}
105+
env:
106+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
94107
timeout-minutes: 60
95108
strategy:
96109
fail-fast: false
97110
matrix:
98111
include:
99-
- xcode: "Xcode_14.0.1.app"
112+
- xcode: "Xcode_14.1.app"
100113
runsOn: macOS-12
101-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
102-
shell: "/bin/zsh {0}"
114+
name: "Xcode 14.1"
103115
steps:
104116
- uses: actions/checkout@v3
105117
- name: ${{ matrix.name }}
106118
run: make test_framework_SQLCipher4Encrypted
107119
CustomSQLite:
108120
name: CustomSQLite
109121
runs-on: ${{ matrix.runsOn }}
122+
env:
123+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
110124
timeout-minutes: 60
111125
strategy:
112126
fail-fast: false
113127
matrix:
114128
include:
115-
- xcode: "Xcode_14.0.1.app"
129+
- xcode: "Xcode_14.1.app"
116130
runsOn: macOS-12
117-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
118-
shell: "/bin/zsh {0}"
131+
name: "Xcode 14.1"
119132
steps:
120133
- uses: actions/checkout@v3
121134
- name: ${{ matrix.name }}
122135
run: make test_framework_GRDBCustomSQLiteOSX
123136
XCFramework:
124137
name: XCFramework
125138
runs-on: ${{ matrix.runsOn }}
139+
env:
140+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}/Contents/Developer"
126141
timeout-minutes: 60
127142
strategy:
128143
fail-fast: false
129144
matrix:
130145
include:
131-
- xcode: "Xcode_14.0.1.app"
146+
- xcode: "Xcode_14.1.app"
132147
runsOn: macOS-12
133-
name: "macOS 12, Xcode 14.0.1, Swift 5.7"
134-
shell: "/bin/zsh {0}"
148+
name: "Xcode 14.1"
135149
steps:
136150
- uses: actions/checkout@v3
137151
- name: ${{ matrix.name }}

CHANGELOG.md

Lines changed: 7 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.6.x` Releases - [6.6.0](#660)
1011
- `6.5.x` Releases - [6.5.0](#650)
1112
- `6.4.x` Releases - [6.4.0](#640)
1213
- `6.3.x` Releases - [6.3.0](#630) - [6.3.1](#631)
@@ -103,6 +104,12 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
103104

104105
---
105106

107+
## 6.6.0
108+
109+
Released December 29, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.5.0...v6.6.0)
110+
111+
- **New**: [#1304](https://github.com/groue/GRDB.swift/pull/1304) by [@groue](https://github.com/groue): Expose generated columns with availability checks
112+
106113
## 6.5.0
107114

108115
Released December 5, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.4.0...v6.5.0)

Documentation/Combine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ let cancellable = hallOfFamePublisher.sink(
398398
[`writePublisher(receiveOn:updates:thenRead:)`]: #databasewriterwritepublisherreceiveonupdatesthenread
399399
[`migratePublisher(_:receiveOn:)`]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasemigrator/migratepublisher(_:receiveon:)
400400
[configured]: ../README.md#databasepool-configuration
401-
[database pool]: ../README.md#database-pools
402-
[database queue]: ../README.md#database-queues
401+
[database pool]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasepool
402+
[database queue]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasequeue
403403
[database snapshot]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasesnapshot
404404
[scheduler]: https://developer.apple.com/documentation/combine/scheduler

Documentation/CustomSQLiteBuilds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal
2121

2222
2. Choose your [extra compilation options](https://www.sqlite.org/compile.html). For example, `SQLITE_ENABLE_FTS5`, `SQLITE_ENABLE_PREUPDATE_HOOK`.
2323

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](../README.md#database-pools).
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).
2525

2626
3. Create a folder named `GRDBCustomSQLite` somewhere in your project directory.
2727

Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/AppDatabase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct AppDatabase {
1717
/// Application can use a `DatabasePool`, while SwiftUI previews and tests
1818
/// can use a fast in-memory `DatabaseQueue`.
1919
///
20-
/// See <https://github.com/groue/GRDB.swift/blob/master/README.md#database-connections>
20+
/// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections>
2121
private let dbWriter: any DatabaseWriter
2222

2323
/// The DatabaseMigrator that defines the database schema.
@@ -162,7 +162,7 @@ extension AppDatabase {
162162
// reading methods.
163163
extension AppDatabase {
164164
/// Provides a read-only access to the database
165-
var databaseReader: DatabaseReader {
165+
var reader: DatabaseReader {
166166
dbWriter
167167
}
168168
}

Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/Persistence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ extension AppDatabase {
2424
try fileManager.createDirectory(at: folderURL, withIntermediateDirectories: true)
2525

2626
// Connect to a database on disk
27-
// See https://github.com/groue/GRDB.swift/blob/master/README.md#database-connections
27+
// See https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections
2828
let dbURL = folderURL.appendingPathComponent("db.sqlite")
2929
let dbPool = try DatabasePool(path: dbURL.path)
3030

@@ -58,7 +58,7 @@ extension AppDatabase {
5858
/// Creates an empty database for SwiftUI previews
5959
static func empty() -> AppDatabase {
6060
// Connect to an in-memory database
61-
// See https://github.com/groue/GRDB.swift/blob/master/README.md#database-connections
61+
// See https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections
6262
let dbQueue = try! DatabaseQueue()
6363
return try! AppDatabase(dbQueue)
6464
}

Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo/PlayerRequest.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ struct PlayerRequest: Queryable {
2929

3030
func publisher(in appDatabase: AppDatabase) -> AnyPublisher<[Player], Error> {
3131
// Build the publisher from the general-purpose read-only access
32-
// granted by `appDatabase.databaseReader`.
32+
// granted by `appDatabase.reader`.
3333
// Some apps will prefer to call a dedicated method of `appDatabase`.
3434
ValueObservation
3535
.tracking(fetchValue(_:))
3636
.publisher(
37-
in: appDatabase.databaseReader,
37+
in: appDatabase.reader,
3838
// The `.immediate` scheduling feeds the view right on
3939
// subscription, and avoids an undesired animation when the
4040
// application starts.

Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 11 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo/AppDatabase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct AppDatabase {
1818
/// Application can use a `DatabasePool`, while SwiftUI previews and tests
1919
/// can use a fast in-memory `DatabaseQueue`.
2020
///
21-
/// See <https://github.com/groue/GRDB.swift/blob/master/README.md#database-connections>
21+
/// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections>
2222
private let dbWriter: any DatabaseWriter
2323

2424
/// The DatabaseMigrator that defines the database schema.
@@ -163,7 +163,7 @@ extension AppDatabase {
163163
// reading methods.
164164
extension AppDatabase {
165165
/// Provides a read-only access to the database
166-
var databaseReader: DatabaseReader {
166+
var reader: DatabaseReader {
167167
dbWriter
168168
}
169169
}

0 commit comments

Comments
 (0)