Skip to content

Commit fa041f8

Browse files
committed
Docs
1 parent 07df335 commit fa041f8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Documentation/Index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ for user in try db.prepare(users) {
756756
promise to the compiler that they’ll never be `NULL`), while `Expression<T?>`
757757
values remain wrapped.
758758

759-
Column subscripts on `Row` will force try and abort execution in error cases
759+
Column subscripts on `Row` will force try and abort execution in error cases.
760760
If you want to handle this yourself, use `Row.get(_ column: Expression<V>)`:
761761

762762
```swift
@@ -1464,10 +1464,10 @@ the insertion, updating, and retrieval of basic Codable types.
14641464

14651465
### Inserting Codable Types
14661466

1467-
Queries have a method to allow inserting an Encodable type.
1467+
Queries have a method to allow inserting an [Encodable][] type.
14681468

14691469
```swift
1470-
struct User: Codable {
1470+
struct User: Encodable {
14711471
let name: String
14721472
}
14731473
try db.run(users.insert(User(name: "test")))
@@ -1482,6 +1482,8 @@ There are two other parameters also available to this method:
14821482
- `otherSetters` allows you to specify additional setters on top of those
14831483
that are generated from the encodable types themselves.
14841484

1485+
[Encodable]: https://developer.apple.com/documentation/swift/encodable
1486+
14851487
### Updating Codable Types
14861488

14871489
Queries have a method to allow updating an Encodable type.
@@ -1504,7 +1506,7 @@ There are two other parameters also available to this method:
15041506

15051507
### Retrieving Codable Types
15061508

1507-
Rows have a method to decode a Decodable type.
1509+
Rows have a method to decode a [Decodable][] type.
15081510

15091511
```swift
15101512
let loadedUsers: [User] = try db.prepare(users).map { row in
@@ -1548,6 +1550,8 @@ Both of the above methods also have the following optional parameter:
15481550
- `userInfo` is a dictionary that is passed to the decoder and made available
15491551
to decodable types to allow customizing their behavior.
15501552

1553+
[Decodable]: https://developer.apple.com/documentation/swift/decodable
1554+
15511555
### Restrictions
15521556

15531557
There are a few restrictions on using Codable types:

0 commit comments

Comments
 (0)