Skip to content
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 v5 for update #7020

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/edgeql/for.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@ are merged into a single output set.

.. note::

The ``union`` keyword is a required part of the ``for`` statement syntax; it
is intended to indicate explicitly that the results of each loop execution
are ultimately merged.
The ``union`` keyword is required prior to EdgeDB 5.0 and is intended to
indicate explicitly that the results of each loop execution are ultimately
merged.

.. versionadded: 5.0

If the body of ``for`` is a statement — ``select``, ``insert``, ``update``,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also group and with

``delete``, ``group``, or ``with`` — ``union`` and the parentheses
surrounding the statement are no longer required:

.. code-block:: edgeql-repl

db> for number in {0, 1, 2, 3}
... select { number, number + 0.5 }
{0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5}


Bulk inserts
------------
Expand Down