Closed ranim-n closed 2 months ago
62 files ±0 62 suites ±0 1m 29s :stopwatch: +3s 1 010 tests +6 1 010 :white_check_mark: +6 0 :zzz: ±0 0 :x: ±0 1 049 runs +6 1 049 :white_check_mark: +6 0 :zzz: ±0 0 :x: ±0
Results for commit 549e591e. ± Comparison against base commit 7d9c62f3.
:recycle: This comment has been updated with latest results.
==
operator and the same error occursquote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)
- out of curiosity, did a test with the
==
operator and the same error occurs- cleaner and safer to use a PG function,
quote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)
I tried using quote_literal
but it's not working. It could be because it's used with json path
out of curiosity, did a test with the
==
operator and the same error occurscleaner and safer to use a PG function,
quote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)I tried using
quote_literal
but it's not working. It could be because it's used with json path
Please give some details
out of curiosity, did a test with the
==
operator and the same error occurscleaner and safer to use a PG function,
quote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)I tried using
quote_literal
but it's not working. It could be because it's used with json pathPlease give some details
I used the method like this :
""" jsonb_path_exists(#{TARGET}#, '$."${mainAttributePath[0]}"."$NGSILD_PROPERTY_VALUE"."$JSONLD_VALUE" ? (@ like_regex quote_literal($value))') """
and still got the same error :
java.lang.IllegalArgumentException: Sql cannot be parsed: unclosed quoted identifier .. SELECT ... (@ like_regex quote_literal("(?i).*It's a name.*"))')
out of curiosity, did a test with the
==
operator and the same error occurscleaner and safer to use a PG function,
quote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)I tried using
quote_literal
but it's not working. It could be because it's used with json pathPlease give some details
I used the method like this :
` """
jsonb_path_exists(#{TARGET}#, '$."${mainAttributePath[0]}"."$NGSILD_PROPERTY_VALUE"."$JSONLD_VALUE" ? (@ like_regex quote_literal($value))') """`
and still got the same error :
`java.lang.IllegalArgumentException: Sql cannot be parsed: unclosed quoted identifier .. SELECT ... (@ like_regex quote_literal("(?i).*It's a name.*"))')`
Did you try passing the value as a named parameter in the jsonb path function? (Like is done for some other queries)
out of curiosity, did a test with the
==
operator and the same error occurscleaner and safer to use a PG function,
quote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)I tried using
quote_literal
but it's not working. It could be because it's used with json pathPlease give some details
I used the method like this : ` """
jsonb_path_exists(#{TARGET}#, '$."${mainAttributePath[0]}"."$NGSILD_PROPERTY_VALUE"."$JSONLD_VALUE" ? (@ like_regex quote_literal($value))') """`
and still got the same error :
`java.lang.IllegalArgumentException: Sql cannot be parsed: unclosed quoted identifier .. SELECT ... (@ like_regex quote_literal("(?i).*It's a name.*"))')`
Did you try passing the value as a named parameter in the jsonb path function? (Like is done for some other queries)
I didn't understand your suggestion well
out of curiosity, did a test with the
==
operator and the same error occurscleaner and safer to use a PG function,
quote_literal
should do it (see https://www.postgresql.org/docs/16/functions-string.html)I tried using
quote_literal
but it's not working. It could be because it's used with json pathPlease give some details
I used the method like this : ` """
jsonb_path_exists(#{TARGET}#, '$."${mainAttributePath[0]}"."$NGSILD_PROPERTY_VALUE"."$JSONLD_VALUE" ? (@ like_regex quote_literal($value))') """`
and still got the same error :
`java.lang.IllegalArgumentException: Sql cannot be parsed: unclosed quoted identifier .. SELECT ... (@ like_regex quote_literal("(?i).*It's a name.*"))')`
Did you try passing the value as a named parameter in the jsonb path function? (Like is done for some other queries)
I didn't understand your suggestion well
instead of doing:
jsonb_path_exists(#{TARGET}#,
'$."${mainAttributePath[0]}"."$NGSILD_PROPERTY_VALUE"."$JSONLD_VALUE" ? (@ like_regex $value)')
doing something like this (wondering if in this case the PG query parser will process the quote_literal
before calling the jsonb function):
jsonb_path_exists(#{TARGET}#,
'$."${mainAttributePath[0]}"."$NGSILD_PROPERTY_VALUE"."$JSONLD_VALUE" ? (@ like_regex ${'$'}value)',
'{ "value": quote_literal($value) }')
${'$'}value)', '{ "value": quote_literal($value) }')
I got the same error :
java.lang.IllegalArgumentException: Sql cannot be parsed: unclosed quoted identifier (identifier opened at index 423) in statement: SELECT ... (@ like_regex $value)', '{ "value": quote_literal("(?i).*It's a name.*") }')
${'$'}value)', '{ "value": quote_literal($value) }')
I got the same error :
java.lang.IllegalArgumentException: Sql cannot be parsed: unclosed quoted identifier (identifier opened at index 423) in statement: SELECT ... (@ like_regex $value)', '{ "value": quote_literal("(?i).*It's a name.*") }')
too bad.
@thomasBousselin your review is missing
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I based my branch on the refactoring branch