Skip to content

Commit 0872647

Browse files
committed
Update Index.md
1 parent 140374a commit 0872647

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Documentation/Index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,18 @@ do {
638638
}
639639
```
640640

641+
Multiple rows can be inserted at once by similarily calling `insertMany` with an array of per-row [setters](#setters).
642+
643+
```swift
644+
do {
645+
let rowid = try db.run(users.insertMany([mail <- "alice@mac.com"], [email <- "geoff@mac.com"]))
646+
print("inserted id: \(rowid)")
647+
} catch {
648+
print("insertion failed: \(error)")
649+
}
650+
```
651+
652+
641653
The [`update`](#updating-rows) and [`delete`](#deleting-rows) functions
642654
follow similar patterns.
643655

0 commit comments

Comments
 (0)