jirutka/rsql-parser

Provide an escape character so that single and double quotes can exist in a value simultaneously.

RutledgePaulV opened this issue · 4 comments

Currently there doesn't seem to be a way to specify a query value that contains both a single quote and a double quote. If it contains a single quote, you can wrap the value in double quotes. If it contains a double quote, you can wrap it in single quotes. If it contains both, I don't know how to make it work!

@jirutka any update on allowing values to be escaped in this manner?

@jirutka any update here?

Sorry for very long delay. I’ve just released 2.1.0 with updated grammar that supports escape character inside a quoted argument:

If you need to use both single and double quotes inside a quoted argument, then you must escape one of them using \ (backslash). If you want to use \ literally, then double it as \\. Backslash has a special meaning only inside a quoted argument, not in unquoted argument.

@jirutka can you please help me here.
Mongo query :
{ field: { $mod: [ divisor, remainder ] } } How can we convert this to RSQL

Thanks,
Rambabu