test_roundtrip: 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.
Table columns to exclude (default) or include, dependent on
the value of invert. One of datetime, date, binary,
integer, double, character, logical.
invert
If TRUE, change the definition of columns to be exclusive,
rather than inclusive.
force_sorted
If TRUE, a sorted id column is added to the sent
data, and the received data is sorted by this column before doing the
comparison. This is necessary for some databases that do not preserve row
order.
Details
This function is not exported and should only be used during tests and as a
sanity check when writing new odbcDataType() methods.
if (FALSE) {
test_roundtrip(con)
# exclude a few columnstest_roundtrip(con, c("integer", "double"))
# Only test a specific columntest_roundtrip(con, "integer", invert = FALSE)
}