Commits the current transaction, making all changes permanent. Optionally adds metadata (author, commit message, and extra info) to the snapshot.
Usage
commit_transaction(
conn = NULL,
author = NULL,
commit_message = NULL,
commit_extra_info = NULL
)Details
This function commits all changes made since begin_transaction() was called,
making them permanent in the database.
If author, commit_message, or commit_extra_info are provided,
they will be set using CALL ducklake.set_commit_message() within the
transaction before the COMMIT statement, as required by the DuckLake
v1.0 specification.
See also
Other transactions:
begin_transaction(),
rollback_transaction(),
set_snapshot_metadata(),
with_transaction()
Examples
if (FALSE) { # \dontrun{
# Basic commit
begin_transaction()
# ... make changes ...
commit_transaction()
# Commit with metadata
begin_transaction()
create_table(mtcars, "cars")
commit_transaction(
author = "John Doe",
commit_message = "Add cars dataset"
)
} # }
