Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 4 additions & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /