On Wed, 15 Oct 2025 21:26:05 GMT, Johannes Döbler <[email protected]> wrote:

>> No plans to do that in the default implementation.  Driver vendors 
>> can/should optimize as needed based on their driver implementation.
>
> Hi @LanceAndersen,
> don*t know what you mean with " Driver vendors can/should optimize as needed 
> based on their driver implementation."
> My idea was that in JDBC 4.5 the default methods 
> Statement.enquoteNCharLiteral and Statement.enquoteIdentifier could call the 
> new corresponding default methods in Connection, therefore easing life of 
> JDBC vendor or test libraries to have a **_single_** site to override.

Hi,

Thank you for your suggestion, but I have no plans to make the suggested change:

- The methods were added to the JDBC as of JDK 9, ~10 years ago
 - drivers that have implemented  these methods would have already added them 
to their Statement implementation
 - Most implementations of Statement would have more efficient access to the 
Connection object should they decide to move their implementation to their 
Connection implementation 
 -  It would be trivial to refactor these methods to their Connection 
implementation or another package-private class

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27693#discussion_r2435995943

Reply via email to