-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document wrapping insert
with select
#6936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We added some details about this to the edgedb-js docs (see geldata/gel-js#838). To that end, makes sense to add this to the update
docs as well, yeah?
Maybe we also need to update select
in a way that makes this pattern intuitive?
|
||
.. code-block:: edgeql-repl | ||
|
||
db> select (insert Hero { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also offer an example of a with
style, which I personally prefer as a better-looking formulation:
with
NewHero := (insert)
select
NewHero {
id,
name,
}
@scotttrinh Good idea. Maybe we just cover |
@scotttrinh Added this to the Would you take a peek at the new stuff and make sure it looks reasonable before I merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New changes look good!
I thought we already had this documented — and I believe it is in the book — but it's a pretty fundamental concept and should also be documented here.