Stored procedure call escape ({call ...}) support
Mark Rotteveel
mark at lawinegevaar.nl
Thu Jan 3 05:52:29 PST 2013
I am currently rewriting the JDBC escape implementation in Jaybird, and
reviewing the implementation of CallableStatement related to the {call
...} escape.
Currently I am wondering if I should support the call-escape in
Statement and PreparedStatement as well. The current implementation in
Jaybird does support this right now (probably accidentally given the
current escape parser, and with some caveats), but it provides some
challenges with regard to double or maybe even triple parsing the
statement, which I could simply remove if I only need to support it in
CallableStatement.
On the one hand only the CallableStatement javadoc
(http://docs.oracle.com/javase/7/docs/api/java/sql/CallableStatement.html)
mentions the call-escape, but on the other hand section 6.4 of JDBC 4.1
mentions:
"Support for calling stored procedures using the execute method on the
Statement, PreparedStatement, and CallableStatement interfaces only
requires that [..]"
Which to me seems to imply that {call ... } should also be supported on
Statement and PreparedStatement. Is that assumption correct?
Also with regard to the {? = call ...} escape, is it allowed to extend
this escape to support multiple output parameters (eg {?,?,? = call ...}
or maybe {(?,?,?) = call ...} or should cases with multiple output
parameters simply only be supported with the Firebird specific syntax?
Mark
--
Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list