Impossible to do XMLQUERY for Oracle databases
I've been trying out DataGrip as a replacement for TOAD but have hit a rather large snag with the string wrapping in the code editor.
-- What I want
SELECT
XMLQUERY('
copy $temp := $data/*
modify (
replace value of node $temp/FOO with $foo
)
return $temp
'
PASSING
XMLELEMENT("ROOT",
XMLELEMENT("FOO", 10)
) AS "data",
12 AS "foo"
RETURNING CONTENT
)
FROM dual
-- What I get
SELECT
XMLQUERY('' ||
'copy $temp := $data/*' ||
'modify (' ||
'replace value of node $temp/FOO with $foo ' ||
')' ||
'return $temp'
PASSING
XMLELEMENT("ROOT",
XMLELEMENT("FOO", 10)
) AS "data",
12 AS "foo"
RETURNING CONTENT
)
FROM dual
The second errors because the XQuery is missing whitespace. Is there any way to disable this behavior?
Please sign in to leave a comment.
This is a bug: https://youtrack.jetbrains.com/issue/DBE-2938