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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative syntax for AQL array iteration #20375

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

jsteemann
Copy link
Contributor

Scope & Purpose

  • Introduce alternative syntax for AQL array iteration using FOR loop:
    • FOR [value] IN expression: identical to FOR value IN expression, but more clearly indicates that they iteration is over an array of values.
    • FOR [idx, value] IN expression: populates an additional output variable (idx` in this case) with the row number, starting at 0. Both syntaxes cannot be used to iterate directly over collections or view, i.e. the input expression cannot be a collection or a view.
  • 馃挬 Bugfix
  • 馃崟 New feature
  • 馃敟 Performance improvement
  • 馃敤 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++ Unit tests
    • integration tests
    • resilience tests
  • 馃摉 CHANGELOG entry made
  • 馃摎 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.11: -
    • Backport for 3.10: -

Related Information

  • Docs PR:
  • Enterprise PR:
  • GitHub issue / Jira ticket:
  • Design document:

* Introduce alternative syntax for AQL array iteration using FOR loop:
  * `FOR [value] IN expression`: identical to `FOR value IN expression`, but
    more clearly indicates that they iteration is over an array of values.
  * FOR [idx, value] IN expression`: populates an additional output variable
    (`idx` in this case) with the row number, starting at 0.
  Both syntaxes cannot be used to iterate directly over collections or view,
  i.e. the input expression cannot be a collection or a view.
@jsteemann jsteemann added this to the devel milestone Dec 23, 2023
@cla-bot cla-bot bot added the cla-signed label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant