cdm_copy_to() takes a src- or con-object as a first argument,
and a dm object as a second. The latter is copied to the former. By default
the key constraints will be set (for now only on MSSQL- and Postgres-DBs).
By default temporary tables will be created.
Possible further arguments passed to dplyr::copy_to() (which is used on each table)
overwrite, types, indexes, unique_indexes
Must remain NULL.
set_key_constraints
Boolean variable, if TRUE will mirror dm key constraints on a database.
unique_table_names
Boolean, if FALSE (default), original table names will be used, if TRUE,
unique table names will be created based on the original table names.
table_names
A named character vector, containing the names you want the tables in the dm to have
after copying them to the database. The table names within the dm will remain unchanged.
The name of each element of the vector needs to be one of the table names of the dm.
Those tables of the dm that are not addressed will be called by their original name on the database.
temporary
Boolean variable, if TRUE will only create temporary tables, which will vanish when connection is interrupted.
Details
No tables will be overwritten, passing overwrite = TRUE gives an error.
Types are determined separately for each table, setting the types argument
also gives an error.
The arguments are included in the signature to avoid passing them via the
... ellipsis.