We're updating the issue view to help you get more done. 

cfscript Query doesn't play well with oracle parameters

Description

In oracle, you can parameterize a statement by prepending the parameter with a colon. Normally this isn't a problem in a typical web app on railo. So this is an edge case. But lets say we had some code that would deploy a database, including database triggers. Oracle uses parameters in triggers. So you can't use query.cfc to create the trigger. Here is an example of an oracle sql statement that uses colons.

CREATE OR REPLACE TRIGGER triggerDir
BEFORE INSERT ON triggerTest
FOR EACH ROW

BEGIN
SELECT triggerSeq.NEXTVAL
INTO :new.col1
FROM dual;
END;
(notice the :new, parameter)

This would cause lucee to see the :new parameter and will expect the parameter to be provided. It throws this exception "The named parameter [1] has not been provided".

I propose we allow "escaping" colons by using double colons. In the example above. e.g. ::new which will be compressed to a single colon.

Environment

Oracle database

Status

Assignee

Michael Offner

Reporter

Colby Litnak

Fix versions

Affects versions

4.5.1.015

Priority

Minor