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

Use $literal when needed in Mongo translator #587

Open
davinov opened this issue Aug 6, 2020 · 0 comments
Open

Use $literal when needed in Mongo translator #587

davinov opened this issue Aug 6, 2020 · 0 comments
Labels
mongo Mongo backend

Comments

@davinov
Copy link
Member

davinov commented Aug 6, 2020

A filter like column "foo" equals "bar" will be translated as {$match: {foo: "bar"}}.
Likewise, a filter like column "foo" equals "$10" will be translated as {$match: {foo: "$10"}}. Except that the $10 in mongo will be understood as "the column 10", which probably doesn't exist. We should use the $literal operator where the $ and . signs should be read without any interpretation.

@davinov davinov added the mongo Mongo backend label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mongo Mongo backend
Projects
None yet
Development

No branches or pull requests

1 participant