[
https://issues.jboss.org/browse/ARQ-1887?page=com.atlassian.jira.plugin.s...
]
Arkadiusz Gasiński commented on ARQ-1887:
-----------------------------------------
I have run into another issue that is related to how the scripts are split before
execution.
This time I'm trying to insert a simple JavaScript script into my table and all
script's content between curly braces is cut out, which causes the test failure, since
the script cannot be parsed by the Nashorn engine - example below.
{code:title=script.sql|borderStyle=solid}
INSERT INTO SCRIPT(ENGINE, BODY) VALUES('JavaScript', 'function
execute(context) {var Result = Java.type("xx.xxxxxx.xxxx.xxxxx.Result"); var
result = new Result(); if (context.service === undefined) {result.code = 100;} else {
result.code = 0;} return result;}');
{code}
Result:
{code:title=output.log|borderStyle=solid}
INSERT INTO SCRIPT(ENGINE, BODY) VALUES('JavaScript', 'function
execute(context) else return result;}');
{code}
The question is: shall I make a separate issue for this or maybe this comment will be
enough?
Thanks!
SQL scripts and ANSI_SQL_COMMENTS_PATTERN - unable to insert URL
----------------------------------------------------------------
Key: ARQ-1887
URL:
https://issues.jboss.org/browse/ARQ-1887
Project: Arquillian
Issue Type: Feature Request
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha7
Reporter: Arkadiusz Gasiński
Assignee: Bartosz Majsak
Unable to insert URLs using @ApplyScriptBefore - example below.
{code:title=sample.sql|borderStyle=solid}
INSERT INTO CONFIG(NAME, MODULE, VALUE) VALUES('core.url',
'isep-core-tck',
'http://localhost:41080/BusinessLogicVersioningTest/api/v1');
{code}
Setting showSql to true in persistence-script extension configuration in arquillian.xml
produces the following output:
{code:title=output.log|borderStyle=solid}
INSERT INTO CONFIG(NAME, MODULE, VALUE) VALUES('core.url',
'isep-core-tck', 'http:
{code}
The double slash (//) after the protocol is treated as a comment and thus the rest of the
statement is ignored.
Shouldn't the // character sequence be treated as a comment only if it's placed
at the beginning of a line?
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)