Skip to content

Commit 5ff2ad9

Browse files
committed
Merge branch 'development'
2 parents 38e7e64 + f5259af commit 5ff2ad9

File tree

134 files changed

+16149
-10065
lines changed

Some content is hidden

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

134 files changed

+16149
-10065
lines changed

.spi.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
version: 1
2-
external_links:
3-
documentation: "https://github.com/groue/GRDB.swift/blob/master/README.md"
2+
builder:
3+
configs:
4+
- documentation_targets: [GRDB]

CHANGELOG.md

Lines changed: 8 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.3.x` Releases - [6.3.0](#630)
1011
- `6.2.x` Releases - [6.2.0](#620)
1112
- `6.1.x` Releases - [6.1.0](#610)
1213
- `6.0.x` Releases - [6.0.0](#600)
@@ -100,6 +101,13 @@ GRDB adheres to [Semantic Versioning](https://semver.org/), with one exception:
100101

101102
---
102103

104+
## 6.3.0
105+
106+
Released November 6, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.2.0...v6.3.0)
107+
108+
- **New**: [#1291](https://github.com/groue/GRDB.swift/pull/1291) by [@groue](https://github.com/groue): DocC inline documentation
109+
- **New**: The `Row.dataNoCopy` methods are deprecated. Use `Row.withUnsafeData` instead.
110+
103111
## 6.2.0
104112

105113
Released October 28, 2022 • [diff](https://github.com/groue/GRDB.swift/compare/v6.1.0...v6.2.0)

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ How you can Contribute
6969

7070
7. **Please provide documentation for your changes**
7171

72-
GRDB documentation is provided as reference (inline doc comments starting with `///`, see [Documentation Comment Syntax](https://github.com/apple/swift/blob/main/docs/DocumentationComments.md)), and guides ([README.md](README.md) and the [Documentation](Documentation) folder).
72+
GRDB documentation is provided as a DocC reference, and guides ([README.md](README.md) and the [Documentation](Documentation) folder).
73+
74+
Please keep the reference and the guides up-to-date. Use Xcode > Product > Build Documentation in order to control the quality of your reference documentation.
7375

7476
GRDB is "documentation-driven", which means that nothing ships until it is supported by documentation that makes sense. Documentation makes sense when someone who is not you is able to figure out what is the purpose of your contribution, how to use it, and what are its eventual caveats and corner cases. When the documentation is hard to write, or reveals too many caveats, it is the sign that the api needs to be fixed.
7577

Documentation/Concurrency.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ let playerCount = try dbQueue.read { db in
118118
}
119119
120120
let newPlayerCount = try dbQueue.write { db -> Int in
121-
try Player(id: 12, name: "Arthur").insert(db)
121+
try Player(name: "Arthur").insert(db)
122122
return try Player.fetchCount(db)
123123
}
124124
```
@@ -145,7 +145,7 @@ let playerCount = try await dbQueue.read { db in
145145
}
146146

147147
let newPlayerCount = try await dbQueue.write { db -> Int in
148-
try Player(id: 12, name: "Arthur").insert(db)
148+
try Player(name: "Arthur").insert(db)
149149
return try Player.fetchCount(db)
150150
}
151151
```
@@ -163,7 +163,7 @@ let playerCountPublisher = dbQueue.readPublisher { db in
163163
}
164164

165165
let newPlayerCountPublisher = dbQueue.writePublisher { db -> Int in
166-
try Player(id: 12, name: "Arthur").insert(db)
166+
try Player(name: "Arthur").insert(db)
167167
return try Player.fetchCount(db)
168168
}
169169
```
@@ -181,7 +181,7 @@ let playerCountObservable = dbQueue.rx.read { db in
181181
}
182182

183183
let newPlayerCountObservable = dbQueue.rx.write { db -> Int in
184-
try Player(id: 12, name: "Arthur").insert(db)
184+
try Player(name: "Arthur").insert(db)
185185
return try Player.fetchCount(db)
186186
}
187187
```
@@ -196,27 +196,24 @@ Those observables do not access the database until they are subscribed. They com
196196
```swift
197197
dbQueue.asyncRead { (dbResult: Result<Database, Error>) in
198198
do {
199-
// Maybe read access could not be established
200199
let db = try dbResult.get()
201200
let playerCount = try Player.fetchCount(db)
202-
... // Handle playerCount
203201
} catch {
204-
... // Handle error
202+
// Handle error
205203
}
206204
}
207205

208-
dbQueue.asyncWrite({ (db: Database) -> Int in
209-
try Player(id: 12, name: "Arthur").insert(db)
206+
dbQueue.asyncWrite { (db: Database) -> Int in
207+
try Player(name: "Arthur").insert(db)
210208
return try Player.fetchCount(db)
211-
}, completion: { (db: Database, result: Result<Int, Error>) in
212-
// Handle write transaction result:
209+
} completion: { (db: Database, result: Result<Int, Error>) in
213210
switch result {
214211
case let .success(newPlayerCount):
215-
... // Handle newPlayerCount
212+
// Handle success
216213
case let .failure(error):
217-
... // Handle error
214+
// Handle error
218215
}
219-
})
216+
}
220217
```
221218

222219
</details>

Documentation/FullTextSearch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ let pattern = FTS3Pattern(matchingAnyTokenIn: "") // nil
304304
let pattern = FTS3Pattern(matchingAnyTokenIn: "*") // nil
305305
```
306306

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):
307+
FTS3Pattern are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/grdb/documentation/grdb/statementarguments):
308308

309309
```swift
310310
let documents = try Document.fetchAll(db,
@@ -587,7 +587,7 @@ let pattern = FTS5Pattern(matchingAnyTokenIn: "") // nil
587587
let pattern = FTS5Pattern(matchingAnyTokenIn: "*") // nil
588588
```
589589

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):
590+
FTS5Pattern are regular [values](../README.md#values). You can use them as query [arguments](https://swiftpackageindex.com/groue/grdb/documentation/grdb/statementarguments):
591591

592592
```swift
593593
let documents = try Document.fetchAll(db,

Documentation/Migrations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ try dbQueue.read { db in
7777
}
7878
```
7979

80-
See the [DatabaseMigrator reference](http://groue.github.io/GRDB.swift/docs/6.2/Structs/DatabaseMigrator.html) for more migrator methods.
80+
See the [DatabaseMigrator reference](https://swiftpackageindex.com/groue/grdb/documentation/grdb/databasemigrator) for more migrator methods.
8181

8282

8383
## The `eraseDatabaseOnSchemaChange` Option

Documentation/ReleaseProcess.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@ To release a new GRDB version:
1313
- On https://github.com/groue/sqlcipher.git upgrade, update SQLCipher version in README.md
1414
- On https://github.com/swiftlyfalling/SQLiteLib upgrade, update SQLite version in Documentation/CustomSQLiteBuilds.md
1515
- Update GRDB version number and release date in:
16-
- Makefile
1716
- CHANGELOG.md
1817
- GRDB.swift.podspec
1918
- README.md
20-
- Documentation/FullTextSearch.md
21-
- Documentation/Migrations.md
2219
- Support/Info.plist
2320
- Commit and tag
2421
- Check tag authors: `git for-each-ref --format '%(refname) %(authorname)' refs/tags`
2522
- Push to the master & development branch
2623
- `pod trunk push --allow-warnings GRDB.swift.podspec`
27-
- `make doc`, and update index.html in the `gh-pages` branch
2824
- Update http://github.com/groue/WWDCCompanion
2925
- Update [performance comparison](https://github.com/groue/GRDB.swift/wiki/Performance):
3026

GRDB.swift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'GRDB.swift'
3-
s.version = '6.2.0'
3+
s.version = '6.3.0'
44

55
s.license = { :type => 'MIT', :file => 'LICENSE' }
66
s.summary = 'A toolkit for SQLite databases, with a focus on application development.'

0 commit comments

Comments
 (0)