This method uses dbx::dbxInsert() as that implementation is much more performant than the standard method from RMariaDB::dbWriteTable(), due to the way Dolt handles repeat INSERT statements.

# S4 method for DoltConnection,character,data.frame
dbWriteTable(
  conn,
  name,
  value,
  field.types = NULL,
  row.names = FALSE,
  overwrite = FALSE,
  append = FALSE,
  temporary = FALSE,
  batch_size = NULL
)

Arguments

conn

a database connection

name

the table name

value

A data frame.

field.types

Optional, overrides default choices of field types, derived from the classes of the columns in the data frame. See dbDataType()

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.

overwrite

a logical specifying whether to overwrite an existing table or not. Its default is FALSE.

append

a logical specifying whether to append to an existing table in the database If appending, then the table (or temporary table) must exist, otherwise an error is reported. Its default is FALSE.

temporary

If TRUE, creates a temporary table that expires when the connection is closed. For dbRemoveTable(), only temporary tables are considered if this argument is set to TRUE

batch_size

The number of records to insert in a single statement (defaults to all)

Details

This the dependency on dbx may be removed if the base issue is resolved: https://github.com/dolthub/dolt/issues/2091.

See also

dolt-read