Skip to content

Commit 81609e7

Browse files
authored
fix typo (#10)
1 parent fbb9eab commit 81609e7

File tree

1 file changed

+3
-3
lines changed
  • Sources/SharingGRDB/Documentation.docc/Articles

1 file changed

+3
-3
lines changed

Sources/SharingGRDB/Documentation.docc/Articles/Fetching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ you can do so using the
3838
[`fetchOne`](<doc:Sharing/SharedReaderKey/fetchOne(sql:arguments:database:scheduler:)>) key:
3939

4040
```swift
41-
@SharedReader(.fetchAll(sql: "SELECT count(*) FROM items"))
41+
@SharedReader(.fetchOne(sql: "SELECT count(*) FROM items"))
4242
var itemsCount = 0
4343
```
4444

@@ -113,7 +113,7 @@ let query = Item.all()
113113
```sql
114114
SELECT * FROM items
115115
WHERE NOT isInStock
116-
ORDER createdAt DESC
116+
ORDER BY createdAt DESC
117117
```
118118

119119
Some may prefer writing their SQL statements in this style rather than a raw SQL string, but we
@@ -167,7 +167,7 @@ items, as well as the count of all items (in stock plus out of stock) like so:
167167
@SharedReader(.fetchOne(sql: "SELECT count(*) FROM items"))
168168
var itemsCount = 0
169169

170-
@SharedReader(.fetchOne(sql: "SELECT * FROM items WHERE isInStock"))
170+
@SharedReader(.fetchAll(sql: "SELECT * FROM items WHERE isInStock"))
171171
var inStockItems: [Item]
172172
```
173173

0 commit comments

Comments
 (0)