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
)
a database connection
the table name
A data frame.
Optional, overrides default choices of field types, derived from the classes of the columns in the data frame. See dbDataType()
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
.
a logical specifying whether to overwrite an existing table
or not. Its default is FALSE
.
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
.
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
The number of records to insert in a single statement (defaults to all)
This the dependency on dbx
may be removed if the base issue is resolved: https://github.com/dolthub/dolt/issues/2091.
dolt-read