You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Christian Tzolov <ct...@pivotal.io> on 2017/11/18 11:15:29 UTC

Setting connection's auto-commit property from the configuration files?

Is there a way to set the ConnectionProperties#setAutoCommit(boolean val)
from the model.json or perhaps via the jdbc URL attributes?

E.g. i'm looking for any configuration option that wouldn't require writing
code such as Connection.setAutoCommit(...)

-- 
Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software
Engineer | Pivotal <http://pivotal.io/> | ctzolov@pivotal.io |+31610285517

Re: Setting connection's auto-commit property from the configuration files?

Posted by Julian Hyde <jh...@apache.org>.
We should make autoCommit a connection property (see https://calcite.apache.org/docs/adapter.html#jdbc-connect-string-parameters <https://calcite.apache.org/docs/adapter.html#jdbc-connect-string-parameters>). Also any other properties set via methods in java.sql.Connection; and also things in java.sql.Statement such as fetchSize.

We should add them to Avatica (see https://calcite.apache.org/avatica/apidocs/org/apache/calcite/avatica/BuiltInConnectionProperty.html <https://calcite.apache.org/avatica/apidocs/org/apache/calcite/avatica/BuiltInConnectionProperty.html>) and they will be available for Calcite. 

Julian


> On Nov 18, 2017, at 3:15 AM, Christian Tzolov <ct...@pivotal.io> wrote:
> 
> Is there a way to set the ConnectionProperties#setAutoCommit(boolean val)
> from the model.json or perhaps via the jdbc URL attributes?
> 
> E.g. i'm looking for any configuration option that wouldn't require writing
> code such as Connection.setAutoCommit(...)
> 
> -- 
> Christian Tzolov <http://www.linkedin.com/in/tzolov> | Principle Software
> Engineer | Pivotal <http://pivotal.io/> | ctzolov@pivotal.io |+31610285517