Skip to content

Commit 4de97e6

Browse files
committed
Merge branch 'development'
2 parents 5a3db29 + 676636b commit 4de97e6

36 files changed

+2017
-344
lines changed

CHANGELOG.md

Lines changed: 36 additions & 28 deletions
Large diffs are not rendered by default.

Documentation/AppGroupContainers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Sharing a Database in an App Group Container
22
============================================
33

4-
This guide [has moved](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasesharing).
4+
This guide [has moved](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasesharing).

Documentation/AssociationsBasics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ let request = Book.including(optional: Book.author)
130130
let bookInfos = BookInfo.fetchAll(db, request)
131131
```
132132

133-
Before we dive in, please remember that associations can not generate all possible SQL queries that involve several tables. You may also *prefer* writing SQL, and this is just OK, because your SQL skills are welcome. The [`splittingRowAdapters(columnCounts:)`](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/splittingrowadapters(columncounts:)) method can help you consume the rows fetched from joined queries, as in `SELECT book.*, author.* FROM ...`.
133+
Before we dive in, please remember that associations can not generate all possible SQL queries that involve several tables. You may also *prefer* writing SQL, and this is just OK, because your SQL skills are welcome. The [`splittingRowAdapters(columnCounts:)`](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/splittingrowadapters(columncounts:)) method can help you consume the rows fetched from joined queries, as in `SELECT book.*, author.* FROM ...`.
134134

135135

136136
## Required Protocols
@@ -2963,7 +2963,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29632963
[Further Refinements to Associations]: #further-refinements-to-associations
29642964
[The Types of Associations]: #the-types-of-associations
29652965
[FetchableRecord]: ../README.md#fetchablerecord-protocols
2966-
[migration]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/migrations
2966+
[migration]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/migrations
29672967
[Record]: ../README.md#records
29682968
[Foreign Key Actions]: https://sqlite.org/foreignkeys.html#fk_actions
29692969
[Associations and the Database Schema]: #associations-and-the-database-schema
@@ -2998,16 +2998,16 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29982998
[Isolation of Multiple Aggregates]: #isolation-of-multiple-aggregates
29992999
[DerivableRequest Protocol]: #derivablerequest-protocol
30003000
[Known Issues]: #known-issues
3001-
[Row Adapters]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/rowadapter
3001+
[Row Adapters]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/rowadapter
30023002
[query interface requests]: ../README.md#requests
30033003
[TableRecord]: ../README.md#tablerecord-protocol
3004-
[Recommended Practices for Designing Record Types]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices
3004+
[Recommended Practices for Designing Record Types]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/recordrecommendedpractices
30053005
[regular aggregating methods]: ../README.md#fetching-aggregated-values
30063006
[EncodableRecord]: ../README.md#persistablerecord-protocol
30073007
[PersistableRecord]: ../README.md#persistablerecord-protocol
30083008
[Codable Records]: ../README.md#codable-records
30093009
[persistence methods]: ../README.md#persistence-methods
3010-
[database observation tools]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseobservation
3010+
[database observation tools]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation
30113011
[FAQ]: ../README.md#faq-associations
30123012
[common table expressions]: CommonTableExpressions.md
30133013
[Common Table Expressions]: CommonTableExpressions.md

Documentation/Combine.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ This publisher has the same behavior as ValueObservation:
226226

227227
- It notifies an initial value before the eventual changes.
228228
- It may coalesce subsequent changes into a single notification.
229-
- It may notify consecutive identical values. You can filter out the undesired duplicates with the `removeDuplicates()` Combine operator, but we suggest you have a look at the [removeDuplicates()](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/valueobservation/removeduplicates()) GRDB operator also.
229+
- It may notify consecutive identical values. You can filter out the undesired duplicates with the `removeDuplicates()` Combine operator, but we suggest you have a look at the [removeDuplicates()](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation/removeduplicates()) GRDB operator also.
230230
- It only completes when it is cancelled.
231231
- By default, it notifies the initial value, as well as eventual changes and errors, on the main thread, asynchronously.
232232

233-
This can be configured with the `scheduling` argument. It does not accept a Combine scheduler, but a [ValueObservationScheduler](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/valueobservationscheduler).
233+
This can be configured with the `scheduling` argument. It does not accept a Combine scheduler, but a [ValueObservationScheduler](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservationscheduler).
234234

235235
For example, the `.immediate` scheduler makes sure the initial value is notified immediately when the publisher is subscribed. It can help your application update the user interface without having to wait for any asynchronous notifications:
236236

@@ -382,23 +382,23 @@ let cancellable = hallOfFamePublisher.sink(
382382
[Usage]: #usage
383383
[Asynchronous Database Access]: #asynchronous-database-access
384384
[Combine]: https://developer.apple.com/documentation/combine
385-
[Database Changes Observation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseobservation
385+
[Database Changes Observation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation
386386
[Database Observation]: #database-observation
387387
[Combine and Data Consistency]: #combine-and-data-consistency
388-
[DatabaseRegionObservation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseregionobservation
388+
[DatabaseRegionObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseregionobservation
389389
[Demo Application]: DemoApps/GRDBCombineDemo/README.md
390390
[SQLite]: http://sqlite.org
391-
[ValueObservation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/valueobservation
392-
[SharedValueObservation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/sharedvalueobservation
391+
[ValueObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation
392+
[SharedValueObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/sharedvalueobservation
393393
[`DatabaseRegionObservation.publisher(in:)`]: #databaseregionobservationpublisherin
394394
[`ValueObservation.publisher(in:scheduling:)`]: #valueobservationpublisherinscheduling
395395
[`SharedValueObservation.publisher()`]: #sharedvalueobservationpublisher
396396
[`readPublisher(receiveOn:value:)`]: #databasereaderreadpublisherreceiveonvalue
397397
[`writePublisher(receiveOn:updates:)`]: #databasewriterwritepublisherreceiveonupdates
398398
[`writePublisher(receiveOn:updates:thenRead:)`]: #databasewriterwritepublisherreceiveonupdatesthenread
399-
[`migratePublisher(_:receiveOn:)`]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasemigrator/migratepublisher(_:receiveon:)
399+
[`migratePublisher(_:receiveOn:)`]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasemigrator/migratepublisher(_:receiveon:)
400400
[configured]: ../README.md#databasepool-configuration
401-
[database pool]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasepool
402-
[database queue]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasequeue
403-
[database snapshot]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasesnapshot
401+
[database pool]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasepool
402+
[database queue]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasequeue
403+
[database snapshot]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasesnapshot
404404
[scheduler]: https://developer.apple.com/documentation/combine/scheduler

Documentation/Concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
:twisted_rightwards_arrows: Concurrency
22
=======================================
33

4-
This guide [has moved](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/concurrency).
4+
This guide [has moved](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/concurrency).

Documentation/CustomSQLiteBuilds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ By default, GRDB uses the version of SQLite that ships with the target operating
55

66
**You can build GRDB with a custom build of [SQLite 3.47.2](https://www.sqlite.org/changes.html).**
77

8-
A custom SQLite build can activate extra SQLite features, and extra GRDB features as well, such as support for the [FTS5 full-text search engine](../../../#full-text-search), and [SQLite Pre-Update Hooks](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/transactionobserver).
8+
A custom SQLite build can activate extra SQLite features, and extra GRDB features as well, such as support for the [FTS5 full-text search engine](../../../#full-text-search), and [SQLite Pre-Update Hooks](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/transactionobserver).
99

1010
GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfalling/SQLiteLib), which uses the same SQLite configuration as the one used by Apple in its operating systems, and lets you add extra compilation options that leverage the features you need.
1111

@@ -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](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasepool).
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/GRDBDemo/GRDBDemo/Database/AppDatabase.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import os.log
1515
final class AppDatabase: Sendable {
1616
/// Access to the database.
1717
///
18-
/// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections>
18+
/// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseconnections>
1919
private let dbWriter: any DatabaseWriter
2020

2121
/// Creates a `AppDatabase`, and makes sure the database schema
@@ -30,19 +30,19 @@ final class AppDatabase: Sendable {
3030

3131
/// The DatabaseMigrator that defines the database schema.
3232
///
33-
/// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/migrations>
33+
/// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/migrations>
3434
private var migrator: DatabaseMigrator {
3535
var migrator = DatabaseMigrator()
3636

3737
#if DEBUG
3838
// Speed up development by nuking the database when migrations change
39-
// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/migrations#The-eraseDatabaseOnSchemaChange-Option>
39+
// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/migrations#The-eraseDatabaseOnSchemaChange-Option>
4040
migrator.eraseDatabaseOnSchemaChange = true
4141
#endif
4242

4343
migrator.registerMigration("v1") { db in
4444
// Create a table
45-
// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseschema>
45+
// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseschema>
4646
try db.create(table: "player") { t in
4747
t.autoIncrementedPrimaryKey("id")
4848
t.column("name", .text).notNull()
@@ -77,7 +77,7 @@ extension AppDatabase {
7777
// }
7878
//
7979
// Uncomment for enabling SQL logging if the `SQL_TRACE` environment variable is set.
80-
// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/database/trace(options:_:)>
80+
// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/database/trace(options:_:)>
8181
// if ProcessInfo.processInfo.environment["SQL_TRACE"] != nil {
8282
// config.prepareDatabase { db in
8383
// let dbName = db.description
@@ -93,7 +93,7 @@ extension AppDatabase {
9393
// #if DEBUG
9494
// // Protect sensitive information by enabling verbose debugging in
9595
// // DEBUG builds only.
96-
// // See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/configuration/publicstatementarguments>
96+
// // See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/configuration/publicstatementarguments>
9797
// config.publicStatementArguments = true
9898
// #endif
9999

Documentation/DemoApps/GRDBDemo/GRDBDemo/Database/Models/Player.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private typealias Columns = Player.Columns
7272

7373
/// Define some player requests used by the application.
7474
///
75-
/// See <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices>
75+
/// See <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/recordrecommendedpractices>
7676
extension DerivableRequest<Player> {
7777
/// A request of players ordered by name.
7878
///

Documentation/DemoApps/GRDBDemo/GRDBDemo/Database/Persistence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ extension AppDatabase {
88
private static func makeShared() -> AppDatabase {
99
do {
1010
// Apply recommendations from
11-
// <https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections>
11+
// <https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseconnections>
1212

1313
// Create the "Application Support/Database" directory if needed
1414
let fileManager = FileManager.default
@@ -47,7 +47,7 @@ extension AppDatabase {
4747
/// Creates an empty database for SwiftUI previews
4848
static func empty() -> AppDatabase {
4949
// Connect to an in-memory database
50-
// See https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseconnections
50+
// See https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseconnections
5151
let dbQueue = try! DatabaseQueue(configuration: AppDatabase.makeConfiguration())
5252
return try! AppDatabase(dbQueue)
5353
}

Documentation/DemoApps/GRDBDemo/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The topics covered in this demo are:
1111

1212
- How to setup a database in an iOS app.
1313
- How to define a simple [Codable Record](../../../README.md#codable-records).
14-
- How to track database changes and animate a SwiftUI List with [ValueObservation](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/valueobservation).
15-
- How to apply the recommendations of [Recommended Practices for Designing Record Types](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/recordrecommendedpractices).
14+
- How to track database changes and animate a SwiftUI List with [ValueObservation](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation).
15+
- How to apply the recommendations of [Recommended Practices for Designing Record Types](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/recordrecommendedpractices).
1616
- How to feed SwiftUI previews with a transient database.
1717

1818
**Files of interest:**
@@ -23,7 +23,7 @@ The topics covered in this demo are:
2323

2424
- [AppDatabase.swift](GRDBDemo/Database/AppDatabase.swift)
2525

26-
`AppDatabase` is the type that grants database access. It uses [DatabaseMigrator](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databasemigrator) in order to setup the database schema, and provides methods that read and write.
26+
`AppDatabase` is the type that grants database access. It uses [DatabaseMigrator](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databasemigrator) in order to setup the database schema, and provides methods that read and write.
2727

2828
`AppDatabase` is [tested](GRDBDemoTests/AppDatabaseTests.swift).
2929

Documentation/FetchedRecordsController.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
FetchedRecordsController has been removed in GRDB 5.
44

5-
See [Database Observation](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseobservation) for other ways to observe the database.
5+
See [Database Observation](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation) for other ways to observe the database.

Documentation/FullTextSearch.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil
301301
let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil
302302
```
303303

304-
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/statementarguments):
304+
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/statementarguments):
305305

306306
```swift
307307
let documents = try Document.fetchAll(db,
@@ -550,7 +550,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil
550550
let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil
551551
```
552552

553-
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/statementarguments):
553+
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/statementarguments):
554554

555555
```swift
556556
let documents = try Document.fetchAll(db,
@@ -689,7 +689,7 @@ let books = Book.fetchAll(db, sql: sql, arguments: [pattern])
689689

690690
**You can define [record](../README.md#records) types around the full-text virtual tables.**
691691

692-
The primary key of those tables is the hidden `rowid` column. If you need to fetch, delete, and update full-text records by primary key, you will have to expose this column to the record type. See [The Database Schema](https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseschema) for more information.
692+
The primary key of those tables is the hidden `rowid` column. If you need to fetch, delete, and update full-text records by primary key, you will have to expose this column to the record type. See [The Database Schema](https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseschema) for more information.
693693

694694
## Unicode Full-Text Gotchas
695695

Documentation/GRDB5MigrationGuide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,15 +501,15 @@ let publisher = observation
501501
This change is innocuous for database boolean values that are `0`, `1`, or `NULL`. However, it is a breaking change for all other database values.
502502

503503

504-
[ValueObservation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/valueobservation
505-
[DatabaseRegionObservation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseregionobservation
504+
[ValueObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation
505+
[DatabaseRegionObservation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseregionobservation
506506
[RxGRDB]: https://github.com/RxSwiftCommunity/RxGRDB
507-
[removeDuplicates]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/valueobservation/removeduplicates()
507+
[removeDuplicates]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/valueobservation/removeduplicates()
508508
[Custom SQL functions]: ../README.md#custom-sql-functions
509509
[Batch updates]: ../README.md#update-requests
510510
[SQL Interpolation]: SQLInterpolation.md
511511
[SQL literal]: SQLInterpolation.md#sql-literal
512512
[SQLRequest]: ../README.md#custom-requests
513513
[QueryInterfaceRequest]: ../README.md#requests
514514
[Combine publishers]: Combine.md
515-
[Database Observation]: https://swiftpackageindex.com/groue/grdb.swift/documentation/grdb/databaseobservation
515+
[Database Observation]: https://swiftpackageindex.com/groue/GRDB.swift/documentation/grdb/databaseobservation

0 commit comments

Comments
 (0)