Skip to content

How to do multiple inserts/updates? #1942

Answered by msullivan
tailhook asked this question in Q&A
Discussion options

You must be logged in to vote

We have added support for tuples in arguments a while ago, so this works now:

WITH data := <array <tuple <key1: str, key2: str> >$pairs
FOR pair IN array_unpack(data) union (
  INSERT Type { key1 := pair.key1, key2 := pair.key2 }
)

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@tailhook
Comment options

@elprans
Comment options

@tailhook
Comment options

@thedeadliestcatch
Comment options

Comment options

You must be logged in to vote
1 reply
@thedeadliestcatch
Comment options

Answer selected by msullivan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants