Transactions functions in the ADBC Scanner DuckDB extension
Function category
Transactions
3 functionsManual transaction control. Toggle autocommit, then commit or roll back explicitly.
Signature
adbc_commit(connection_handle: BIGINT) → BOOLEAN
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
connection_handle
|
Type
BIGINT
|
Mode Positional | Description |
Description
Commit the current transaction on the connection. Pair with adbc_set_autocommit(false) for explicit transaction control.
1
Example 1
SELECT adbc_commit(connection_handle);
Signature
adbc_rollback(connection_handle: BIGINT) → BOOLEAN
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
connection_handle
|
Type
BIGINT
|
Mode Positional | Description |
Description
Roll back the current transaction.
1
Example 1
SELECT adbc_rollback(connection_handle);
Related functions
Signature
adbc_set_autocommit(connection_handle: BIGINT, enabled: BOOLEAN) → BOOLEAN
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
connection_handle
|
Type
BIGINT
|
Mode Positional | Description |
Argument
enabled
|
Type
BOOLEAN
|
Mode Positional | Description |
Description
Toggle autocommit mode. Pass false to start an explicit transaction; pair with adbc_commit / adbc_rollback.
1
Example 1
SELECT adbc_set_autocommit(connection_handle, false);
2
Example 2
SELECT adbc_set_autocommit(connection_handle, true);