Skip to content

Support disabling auto-commit mode in properties#236

Merged
staticlibs merged 1 commit intoduckdb:mainfrom
staticlibs:autocommit_property
May 30, 2025
Merged

Support disabling auto-commit mode in properties#236
staticlibs merged 1 commit intoduckdb:mainfrom
staticlibs:autocommit_property

Conversation

@staticlibs
Copy link
Collaborator

JDBC spec requires the driver to have autoCommit enabled on newly created connections. Changing autoCommit using conn#setAutoCommit() may be not convenient in some environments with limited access to Java API (e.g. Spark SQL).

This change adds a new jdbc_auto_commit connection property that allows to create connections with autoCommit disabled.

Testing: new test added to check that property is effective and that the default mode is unchanged.

JDBC spec requires the driver to have `autoCommit` enabled on newly
created connections. Changing `autoCommit` using `conn#setAutoCommit()`
may be not convenient in some environments with limited access to Java
API (e.g. Spark SQL).

This change adds a new `jdbc_auto_commit` connection property that
allows to create connections with `autoCommit` disabled.

Testing: new test added to check that property is effective and that the
default mode is unchanged.
@staticlibs staticlibs merged commit 2897886 into duckdb:main May 30, 2025
10 checks passed
@staticlibs staticlibs deleted the autocommit_property branch May 30, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant