Enhance Documentation

This commit is contained in:
Gwendal Roué committed 2022-11-09 21:52:22 +01:00
1 parent 85b2e113b2
commit 3014ddb00a
6 files changed
+24 -23

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
Sharing a Database in an App Group Container
============================================
This guide [has moved](SharingADatabase.md).
This guide [has moved](https://groue.github.io/GRDB.swift/docs/6.3/documentation/grdb/databasesharing).
+2 -2
View File
@@ -22,8 +22,8 @@ let SQLITE_TRANSIENT = unsafeBitCast(OpaquePointer(bitPattern: -1), to: sqlite3_
/// }
/// ```
///
/// `Database` methods that modify or query the database schema are listed
/// in <doc:DatabaseSchema>.
/// `Database` methods that modify, query, or validate the database schema are
/// listed in <doc:DatabaseSchema>.
///
/// ## Topics
///
-1
View File
@@ -343,6 +343,5 @@ Types that conform to ``TransactionObserver`` can also use those methods in thei
[demo apps]: https://github.com/groue/GRDB.swift/tree/master/Documentation/DemoApps
[`SQLITE_BUSY`]: https://www.sqlite.org/rescode.html#busy
[Sharing a Database]: SharingADatabase.md
[RxGRDB]: https://github.com/RxSwiftCommunity/RxGRDB
[demo applications]: https://github.com/groue/GRDB.swift/tree/master/Documentation/DemoApps
+6 -4
View File
@@ -6,11 +6,13 @@ SQL is the fundamental language for accessing SQLite databases.
This section of the documentation focuses on low-level SQLite concepts: the SQL language, prepared statements, database rows and values.
If SQL is not your cup of tea, jump to <doc:QueryInterface>.
If SQL is not your cup of tea, jump to <doc:QueryInterface> 🙂
## SQL Support
GRDB has a wide support for SQL. You can execute raw SQL statements:
GRDB has a wide support for SQL.
Once connected with one of the <doc:DatabaseConnections>, you can execute raw SQL statements:
```swift
try dbQueue.write { db in
@@ -21,7 +23,7 @@ try dbQueue.write { db in
}
```
You can build prepared statements and lazily iterate fetched rows with great performances:
Build prepared ``Statement`` and lazily iterate fetched rows with an efficient and fast ``DatabaseCursor``:
```swift
try dbQueue.read { db in
@@ -35,7 +37,7 @@ try dbQueue.read { db in
}
```
And you can leverage ``SQLRequest`` and ``FetchableRecord`` for defining streamlined apis with powerful SQL interpolation features:
Leverage ``SQLRequest`` and ``FetchableRecord`` for defining streamlined apis with powerful SQL interpolation features:
```swift
struct Player: Decodable {
@@ -130,7 +130,7 @@ extension MutablePersistableRecord {
/// If the record has any difference from the other record, executes an
/// `UPDATE` statement so that those differences and only those differences
/// are saved in the database.
/// are updated in the database.
///
/// For example:
///
@@ -174,7 +174,7 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE` statement that updates the modified columns, if and
/// only the record was modified.
/// only if the record was modified.
///
/// For example:
///
@@ -273,8 +273,8 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE RETURNING` statement that updates the modified
/// columns, if and only the record was modified. The method returns a new
/// record built from the updated row.
/// columns, if and only if the record was modified. The method returns a
/// new record built from the updated row.
///
/// - parameter db: A database connection.
/// - parameter conflictResolution: A policy for conflict resolution. If
@@ -300,8 +300,8 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE RETURNING` statement that updates the modified
/// columns, if and only the record was modified. The method returns a new
/// record built from the updated row.
/// columns, if and only if the record was modified. The method returns a
/// new record built from the updated row.
///
/// - parameter db: A database connection.
/// - parameter conflictResolution: A policy for conflict resolution. If
@@ -484,8 +484,8 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE RETURNING` statement that updates the modified
/// columns, if and only the record was modified. The method returns a new
/// record built from the updated row.
/// columns, if and only if the record was modified. The method returns a
/// new record built from the updated row.
///
/// - parameter db: A database connection.
/// - parameter conflictResolution: A policy for conflict resolution. If
@@ -571,8 +571,8 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE RETURNING` statement that updates the modified
/// columns, if and only the record was modified. The method returns a new
/// record built from the updated row.
/// columns, if and only if the record was modified. The method returns a
/// new record built from the updated row.
///
/// - parameter db: A database connection.
/// - parameter conflictResolution: A policy for conflict resolution. If
@@ -599,8 +599,8 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE RETURNING` statement that updates the modified
/// columns, if and only the record was modified. The method returns a new
/// record built from the updated row.
/// columns, if and only if the record was modified. The method returns a
/// new record built from the updated row.
///
/// - parameter db: A database connection.
/// - parameter conflictResolution: A policy for conflict resolution. If
@@ -787,8 +787,8 @@ extension MutablePersistableRecord {
/// Modifies the record according to the provided `modify` closure, and
/// executes an `UPDATE RETURNING` statement that updates the modified
/// columns, if and only the record was modified. The method returns a new
/// record built from the updated row.
/// columns, if and only if the record was modified. The method returns a
/// new record built from the updated row.
///
/// - parameter db: A database connection.
/// - parameter conflictResolution: A policy for conflict resolution. If
+1 -1
View File
@@ -8815,7 +8815,7 @@ This chapter was renamed to [Embedding SQL in Query Interface Requests].
[Combine Support]: Documentation/Combine.md
[Concurrency]: https://groue.github.io/GRDB.swift/docs/6.3/documentation/grdb/concurrency
[Demo Applications]: Documentation/DemoApps
[Sharing a Database]: Documentation/SharingADatabase.md
[Sharing a Database]: https://groue.github.io/GRDB.swift/docs/6.3/documentation/grdb/databasesharing
[FAQ]: #faq
[Database Observation]: #database-changes-observation
[SQLRequest]: https://groue.github.io/GRDB.swift/docs/6.3/documentation/grdb/sqlrequest