Repository navigation
Stumped on String Substitution #537
Closed
scottwillman
started this conversation in
General
Replies: 2 comments
|
If I wrap |
0 replies
|
A parameter can't be inside a string literal. Build the whole jsonpath and pass it as one parameter: const path = '$.** ? (@.type() == "string" && @ like_regex ' + JSON.stringify(textSearch) + ' flag "i")'
await sql`select * from p where jsonb_path_exists(p.details, ${ path }::jsonpath)` |
0 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.
I'm confused as to why this isn't working (obviously)... Here's the string I'm building:
This works perfectly fine in DataGrip. What am I missing? Debug is showing this:
All reactions