These methods are extensions of standard DBI functions such as DBI::dbReadTable. They differ in that they can take an as_of argument, reading historical data from the database that was written as of a certain date or commit hash, or from a different branch.

# S4 method for DoltConnection,character
dbReadTable(
  conn,
  name,
  as_of = NULL,
  ...,
  row.names = FALSE,
  check.names = TRUE
)

# S4 method for DoltConnection
dbListTables(conn, as_of = NULL, ...)

# S4 method for DoltConnection
dbListObjects(conn, prefix = NULL, as_of = NULL, ...)

# S4 method for DoltConnection,character
dbExistsTable(conn, name, as_of = NULL, ...)

Arguments

conn

a dolt connection object, produced by DBI::dbConnect() or dolt()

name

a character string specifying a table name.

as_of

A dolt commit hash, branch name, or object coercible to POSIXct

...

Unused, needed for compatibility with generic.

row.names

Either TRUE, FALSE, NA or a string.

If TRUE, always translate row names to a column called "row_names". If FALSE, never translate row names. If NA, translate rownames only if they're a character vector.

A string is equivalent to TRUE, but allows you to override the default name.

For backward compatibility, NULL is equivalent to FALSE.

check.names

If TRUE, the default, column names will be converted to valid R identifiers.

prefix

A fully qualified path in the database's namespace, or NULL. This argument will be processed with dbUnquoteIdentifier(). If given the method will return all objects accessible through this prefix.

Value

A data.frame in the case of dbReadTable(); a character vector of names for dbListTables() and dbListObjects(), and a logical result for dbExistsTable().

See also

Querying Historical Data with AS OF Queries on the DoltHub blog, and RMariaDB methods upon which these are built.