-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
In Oracle PL/SQL, you can use bind arguments with all kind of identifiers:
"At run time, bind arguments replace corresponding placeholders in the dynamic string. Every placeholder must be associated with a bind argument in the USING clause and/or RETURNING INTO clause. You can use numeric, character, and string literals as bind arguments, but you cannot use Boolean literals (TRUE, FALSE, and NULL)."
For instance, "SELECT a FROM b WHERE c = :1" fails with 0.9.3-SNAPSHOT.
I patched the grammar with:
JdbcNamedParameter JdbcNamedParameter() : {
JdbcNamedParameter parameter = new JdbcNamedParameter();
Token token;
}
{
LOOKAHEAD(2)
":" token=<S_IDENTIFIER> { parameter.setName(token.image); }
| ":" token=<S_LONG> { parameter.setName(token.image); }
{
return parameter;
}
}
I'm quite sure it's not the right way to do it, never done any JavaCC before.