Skip to content

Commit ddb8049

Browse files
committed
Warn about update()
(stephencelis#733)
1 parent 2e8611f commit ddb8049

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Documentation/Index.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1521,10 +1521,13 @@ There are two other parameters also available to this method:
15211521
Queries have a method to allow updating an Encodable type.
15221522

15231523
```swift
1524-
try db.run(users.update(user))
1524+
try db.run(users.filter(id == userId).update(user))
15251525
15261526
```
15271527

1528+
>Unless filtered, using the update method on an instance of a Codable
1529+
> type updates all table rows.
1530+
15281531
There are two other parameters also available to this method:
15291532

15301533
- `userInfo` is a dictionary that is passed to the encoder and made available

0 commit comments

Comments
 (0)