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

Allow JSON operators ?, ?| and ?& for PostgreSQL #356

Open
toburger opened this issue Mar 31, 2020 · 1 comment
Open

Allow JSON operators ?, ?| and ?& for PostgreSQL #356

toburger opened this issue Mar 31, 2020 · 1 comment

Comments

@toburger
Copy link
Contributor

toburger commented Mar 31, 2020

There exist some JSON specific operations in PostgreSQL that begin with the questionmark: https://www.postgresql.org/docs/9.5/functions-json.html

Currently it is only possible to write queries that involve JSON operations in a RawQuery.
But they in turn clash with the placeholder for the parameter ?.

For example when using ?| in a query you get an System.IndexOutOfRangeException: Index was outside the bounds of the array. because it thinks ? is a placeholder.

It would be nice if there exists a possibility to escape the ? by a \ as it is already possible/necessary for { and } (which are also used in JSON operations, e.g data#>>'{Some,Path,To,Field}').

Another, even better, solution would be to have special query methods, that are especially used for JSON queries. I know this is a PostgreSQL specific problem so maybe this could be solved with something which is only enabled when using engine specific queries?

Related:
#235
#346
#358

@toburger
Copy link
Contributor Author

toburger commented Aug 2, 2022

The following pull request can be used to fix this issue: #592

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

No branches or pull requests

1 participant