Examples for nested insert-or-select links with 'for' loops and indexed tuples #6690
Unanswered
thedeadliestcatch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have filed a feature request for the documentation here:
#6689
Parting from https://www.edgedb.com/docs/guides/cheatsheet/insert and https://www.edgedb.com/docs/edgeql/literals#indexing-tuples, https://www.edgedb.com/docs/edgeql/insert#nested-inserts, the documentation is quite lacking in examples of 'for' constructs in nested inserts.
Taking from the documentation example:
How would one implement a for construct processing an input array or list of tuples, so that ExternalContributors are inserted or selected into the 'contributors' link, with the tuples containing ('name','email') referenced by index (for performance reasons, this rings especially true in the Python library).
Or another example, User(s) having multiple email addresses as UserEmail objects, and they must be optimized at select-or-insert time in nested queries for a new User.
Beta Was this translation helpful? Give feedback.
All reactions