test_roundtrip {odbc} | R Documentation |
Test round tripping a simple table
Description
This tests all the supported data types, including missing values. It first writes them to the database, then reads them back and verifies the data is identical to the original.
Usage
test_roundtrip(
con = DBItest:::connect(DBItest:::get_default_context()),
columns = "",
invert = TRUE,
force_sorted = FALSE
)
Arguments
con |
An established DBI connection. |
columns |
Table columns to exclude (default) or include, dependent on
the value of |
invert |
If |
force_sorted |
If |
Details
This function is not exported and should only be used during tests and as a
sanity check when writing new odbcDataType()
methods.
Examples
## Not run:
test_roundtrip(con)
# exclude a few columns
test_roundtrip(con, c("integer", "double"))
# Only test a specific column
test_roundtrip(con, "integer", invert = FALSE)
## End(Not run)