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

Separate query and command types in $db update operations #229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danswann
Copy link
Contributor

@danswann danswann commented Jan 3, 2025

Changes types so that partial structure of the update command is no longer inferred from the structure of the update query.

Fixes #227 and goes a little further to enable type-switching, e.g.:

$db.u({value:"hello"}, {$set:{value:27}});

This does mean you lose out on query-based intellisense while constructing the command, e.g.:
image
so it's not a cost-free change.

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.

Boolean fields that appear in both the query and command of a MongoDB update can cause error
1 participant