weaverbird icon indicating copy to clipboard operation
weaverbird copied to clipboard

Use $literal when needed in Mongo translator

Open davinov opened this issue 4 years ago • 0 comments

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 avatar Aug 06 '20 08:08 davinov