Skip to content

feat(mql-typescript): add MongoDB 8.3 arrayIndexAs/as/valueAs to $filter and $reduce MONGOSH-3244#815

Merged
ivandevp merged 2 commits into
mainfrom
MONGOSH-3244-mql-typescript-v2
Jul 6, 2026
Merged

feat(mql-typescript): add MongoDB 8.3 arrayIndexAs/as/valueAs to $filter and $reduce MONGOSH-3244#815
ivandevp merged 2 commits into
mainfrom
MONGOSH-3244-mql-typescript-v2

Conversation

@ivandevp

@ivandevp ivandevp commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Bumps the mql-specifications submodule and regenerates schema.d.ts to include new MongoDB 8.3 argument definitions for $filter and $reduce.

New optional fields (all minVersion: 8.3):

  • $filter: arrayIndexAs — exposes the index of the current element, usable within cond
  • $reduce: as, valueAs, arrayIndexAs — custom names for the element variable (default $$this), cumulative value variable (default $$value), and element index

$map already had arrayIndexAs from a previous change.

Dependency

⚠️ The submodule currently points to an unmerged branch (MONGOSH-3244-array-index-args) in mongodb/mql-specifications. This PR will be updated to the merge commit once mql-specifications#54 is merged before marking ready for review. Submodule was bumped already.

Test plan

  • schema.d.ts correctly includes arrayIndexAs?: string on $filter and $reduce, and as?: string / valueAs?: string on $reduce
  • Downstream: mongodb-ts-autocomplete suggests these fields when typing inside $filter, $map, and $reduce in mongosh/Compass

…ter and $reduce MONGOSH-3244

Bumps the mql-specifications submodule and regenerates schema.d.ts.

New optional fields (minVersion 8.3):
- $filter: arrayIndexAs — exposes current element index in cond
- $reduce: as, valueAs, arrayIndexAs — custom names for element,
  cumulative value, and element index variables

NOTE: submodule points to an unmerged branch (MONGOSH-3244-array-index-args).
Will be updated to the merge commit once mongodb/mql-specifications#54 merges.
MONGOSH-3244

Updates submodule from unmerged branch commit to the merged main commit
(5b4e863) of mongodb/mql-specifications#54 and regenerates schema.d.ts.
@ivandevp
ivandevp marked this pull request as ready for review July 3, 2026 15:53
@ivandevp
ivandevp merged commit a5825fc into main Jul 6, 2026
8 checks passed
@ivandevp
ivandevp deleted the MONGOSH-3244-mql-typescript-v2 branch July 6, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants