Skip to contents

Rolls back the current transaction, discarding all changes made since the transaction began.

Usage

rollback_transaction(conn = NULL)

Arguments

conn

Optional DuckDB connection object. If not provided, uses the default ducklake connection.

Value

Invisibly returns TRUE on success

Details

This function discards all changes made since begin_transaction() was called, reverting the database to its state before the transaction began.

Examples

if (FALSE) { # \dontrun{
begin_transaction()
# ... make changes ...
# Something went wrong, rollback
rollback_transaction()
} # }