Skip to content

feat(mongodb-constants): update $unionWith template with db field COMPASS-9980#802

Open
ivandevp wants to merge 1 commit into
mainfrom
COMPASS-9980
Open

feat(mongodb-constants): update $unionWith template with db field COMPASS-9980#802
ivandevp wants to merge 1 commit into
mainfrom
COMPASS-9980

Conversation

@ivandevp

@ivandevp ivandevp commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Updates the $unionWith stage template to document the new optional db field introduced in MongoDB 9.0 (SERVER-105087).

The db field allows cross-database unions — when present, $unionWith can union with a collection in a different database than the one the aggregate command is running against. Without db, the stage behaves identically to today (same-database union).

The change adds db to the comment only (not the default snippet), following the same convention as $lookup where optional/versioned fields are documented but not inserted by default. This avoids breaking users on MongoDB < 9.0 who use the template and would otherwise get an unsupported field.

Open Questions

None.

Checklist

@ivandevp ivandevp requested review from addaleax and gribnoysup June 25, 2026 16:20
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.

1 participant