Records a new commit in the version history. This is the Dolt sense of "commit" and has nothing to do with [DBI::dbCommit()], which ends a SQL transaction; see [doltliter-transactions].
Arguments
- con
a `DoltliteConnection`.
- message
the commit message.
optionally `"Name <email>"`, overriding [dolt_config()] for this commit only.
- all
stage every changed table first, like `git commit -a` (the default).
- allow_empty
create a commit even when nothing changed.
- force
commit despite outstanding constraint violations.
Examples
con <- DBI::dbConnect(doltliter::Doltlite(), tempfile())
dolt_config(con, user.name = "Ada", user.email = "ada@example.com")
DBI::dbWriteTable(con, "users", data.frame(id = 1:2, nm = c("a", "b")))
dolt_commit(con, "Initial load")
dolt_log(con)$message
#> [1] "Initial load" "Initialize data repository"
DBI::dbDisconnect(con)