8000 Support multi-row inserts · theasp/postgres.async@939be62 · GitHub
[go: up one dir, main page]

Skip to content

Commit 939be62

Browse files
committed
Support multi-row inserts
1 parent d99d40d commit 939be62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ Insert is executed with an sql-spec that supports keys `:table` and `:returning`
7272

7373
Multiple rows can be inserted by passing a sequence to `insert!`.
7474

75+
```clojure
7576
(<!! (<insert! db {:table "products" :returning "id"}
7677
[{:name "hammer" :price 5}
7778
{:name "nail" :price 1}]))
7879
; [{:updated 2, :rows [{:id 1001} {:id 1002]} nil]
80+
```
7981

8082
### update!
8183

0 commit comments

Comments
 (0)
0