Replies: 1 comment 5 replies
-
A bit of implementation background, Doobie merely turns any interpolated values in fragments into In this case since your JSON path is static, I think it might be simpler to do So your doobie fragment will look like |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently banging my head against a query that is using json path operators and supposed to work like this:
However I get different kind of errors depending on how I write the query in Scala/Doobie:
SELECT TRUE FROM table WHERE id = $id AND json @? '$$.key == $value'
compiles but gives: syntax error at or near "'$.key == ?'"
SELECT TRUE FROM table WHERE id = $id AND json @? $$.key == $value
compiles but gives: No value given for parameter 3.
SELECT TRUE FROM table WHERE id = $id AND json @?? '$$.key == $value'
compiles but gives: The column 2 index is invalid. Columns: 1.
SELECT TRUE FROM table WHERE id = $id AND json @?? $$.key == $value
compiles but gives: syntax error near "$"
Breaking it up like:
compiles but gives: syntax error at or near "'$.key == ? '"
Any ideas?
Kind regards,
Beta Was this translation helpful? Give feedback.
All reactions