File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
clickhouse-jdbc/src/main/java/ru/yandex/clickhouse Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,10 @@ public String nativeSQL(String sql) throws SQLException {
209209
210210 @ Override
211211 public void setAutoCommit (boolean autoCommit ) throws SQLException {
212-
212+ if (autoCommit ) {
213+ return ;
214+ }
215+ throw new SQLFeatureNotSupportedException ("Transactions are not supported" );
213216 }
214217
215218 @ Override
@@ -219,12 +222,12 @@ public boolean getAutoCommit() throws SQLException {
219222
220223 @ Override
221224 public void commit () throws SQLException {
222-
225+ throw new SQLException ( "Cannot commit when auto-commit is enabled" );
223226 }
224227
225228 @ Override
226229 public void rollback () throws SQLException {
227-
230+ throw new SQLException ( "Cannot rollback when auto-commit is enabled" );
228231 }
229232
230233 @ Override
You can’t perform that action at this time.
0 commit comments