Row-level differences for one table

Description

Wraps DoltLite's per-table 'dolt_diff_<table>' relation. Columns come in 'from_'/'to_' pairs plus commit metadata and a 'diff_type'.

Usage

dolt_table_diff(con, table, from = NULL, to = NULL, range = NULL)

Arguments

Value

A data frame.

Examples

con <- DBI::dbConnect(doltliter::Doltlite(), tempfile())
dolt_config(con, user.name = "Ada", user.email = "ada@example.com")
DBI::dbWriteTable(con, "t", data.frame(id = 1:2, v = c(10, 20)))
dolt_commit(con, "init")
DBI::dbExecute(con, "UPDATE t SET v = 99 WHERE id = 1")
#> [1] 1
dolt_table_diff(con, "t", from = "HEAD", to = "WORKING")$diff_type
#> [1] "modified"
DBI::dbDisconnect(con)