dbGetInfo().immediate argument (r-dbi/DBI#268).dbCreateTable() and dbAppendTable() (#169).unquote_identifier_table_schema test: Identifiers of the form table.schema can be processed with dbUnquoteIdentifier().has_completed_statement test (#176).test_*() gain new run_only = NULL argument that allow restricting the tests to be run with a positive match. test_some() uses run_only instead of constructing a regular expression with negative lookahead. This helps troubleshooting a single test with testthat::set_reporter(DebugReporter$new()) .make_context() gains default_skip argument and uses the DBIConnector class.NULL default value in driver constructor (#171).Id() is reexported.temporary argument in dbRemoveTable() (default: FALSE) (r-dbi/DBI#141).bigint argument to dbConnect() is now specified. Accepts "integer64", "integer", "numeric" and "character", large integers are returned as values of that type (#133).field.types argument.dbRemoveTable(fail_if_missing = FALSE) (r-dbi/DBI#197).dbColumnInfo() (r-dbi/DBI#75).dbListFields() (r-dbi/DBI#75).dbBind(), by shuffling them (#138).row.names = FALSE for dbReadTable() and dbWriteTable() (#139).params argument to dbGetQuery(), dbSendQuery(), dbExecute() and dbSendStatement() (#159).dbQuoteIdentifier(): “The names of the input argument are preserved in the output” (r-lib/DBI#173).dbIsValid() on stale connections.NULL anymore.dbGetInfo(DBIDriver) for now."cannot_forget_disconnect" test that fails on R-devel (#150).db prefix are not checked for ellipsis in the signature anymore.Inf and NaN for lack of consistent support across DBMS (#142).POSIXlt bind test correctly.dbBind().dbBind(), now queries of the form SELECT CASE WHEN (? = ?) AND (? IS NULL) THEN 1.5 ELSE 2.5 are issued. The original tests were inappropriate for RMariaDB, because an untyped placeholder is returned as a blob.dbWriteTable() instead of dbCreateTable(), because some DBMS don’t support transactions for DML."roundtrip_timestamp" test now correctly handles timezone information. The output timezone is ignored.spec_meta_get_info_result (#143).n in dbGetQuery() call.blob_cast allows specifying a conversion function to the BLOB data type.is_null_check tweak that allows specifying a function that is used when checking values for NULL. Required for RPostgres.list_temporary_tables tweak that can be enabled independently of temporary_tables to indicate that the DBMS does not support listing temporary tables.test_all() by specifying an environment variable.test_all() and test_some() return NULL invisibly.DBI::dbQuoteLiteral() is unavailable.trivial_query() replaces many hard-coded queries and uses non-integer values for better compatibility with RMariaDB."cannot_forget_disconnect" test that fails on R-devel (#150).Finalize specification. Most tests now come with a corresponding prose, only those where the behavior is not finally decided don’t have a prose version yet (#88).
dbBind() against factor works but raises a warning (#91).field.types argument to dbWriteTable() (#12).dbDisconnect().numeric and character (#74).dbFetch() on update-only query returns warning (#66).NULL is a valid value for the row.names argument, same as FALSE.row_names receives no special handling (#54).dbDisconnect() on a closed or invalid connection.row.names = FALSE is now the default for methods that read or write tables.NA to beginning and end of columns in table roundtrip tests (#24).dbGetQuery(), dbFetch(), and dbReadTable() is now checked for consistency (all columns have the same length, length matches number of rows) (#126).hms (or other subclasses of difftime) to be returned as time class (#135, @jimhester).numeric (#99, @jimhester).POSIXlt by POSIXct (#100, @jimhester)."PST8PDT" instead of "PST" as time zone (#110, @thrasibule).blob objects (input and output), but backends are not required to return blob objects (#98).logical_return, date_typed and timestamp_typed tweaks are respected by the bind tests.difftime.dbListTables() test.NULL and not NA entries for SQL NULL values.expect_equal_df() for list columns.dbDisconnect() or dbClearResult() (#103).NaN to NA (#79).test_some() to test individual tests (#136).DBItest_tweaks class gains a $ method, accessing an undefined tweak now raises an error.tweaks() function now have default values that further describe their intended usage.with_closed_connection(), with_invalid_connection(), with_result() and with_remove_test_table() helpers, and expect_visible(), expect_inbisible_true(), and expect_equal_df() expectations for more concise tests.DBIspec-wip page for work-in-progress documentation.max.connections element in dbGetInfo(Driver) (rstats-db/DBI#56).ellipsis check that verifies that all implemented DBI methods contain ... in their formals. This excludes show() and all methods defined in this or other packages.bind_ tests to use the new parameter_pattern tweak (#95).fetch_zero_rows test, split from fetch_premature_close.dbDataType("DBIDriver", "ANY") (#88).dbBind(), test is run by BindTester class, and behavior is specified by members and by instances of the new BindTesterExtra class.skip argument to the test_() functions is again evaluated with perl = TRUE to support negative lookaheads (#33).dbSendStatement() and dbExecute() where appropriate.R CMD check (#81).read_table test when the backend actually returns the data in a different order.dbDataType() on connections (#69, #75, @imanuelcostigan).dbBind() + dbFetch() on the same result set (#51).tweaks() gains an ... as first argument to support future/deprecated tweaks (with a warning), and also to avoid unnamed arguments (#83).testthat now shows a more accurate location for the source of errors, failures, and skips (#78).skip() call per test function.constructor_relax_args tweak, currently not queried.ctx argument is now explicit in the test functions.testthat compatibility hack.all_have_utf8_or_ascii_encoding() which vectorizes has_utf8_or_ascii_encoding().skip argument to the test functions is now treated as a Perl regular expression to allow negative lookahead. Use skip = "(?!test_regex).*" to choose a single test to run (#33).simultaneous_connections test always closes all connections on exit (@hoesler, #68).testthat dependency
testthat to avoid R CMD check warnings.testthat (#62).RPostgres and RMySQL from rstats-db.DBI and testthat from GitHub.tweaks to make_context() (#49).tweaks(), essentially constructs a named list of tweaks but with predefined and documented argument names.constructor_name, respected by the constructor.* tests.strict_identifier, if TRUE all identifier must be syntactic names even if quoted. The quoting test is now split, and a part is ignored conditional to this tweak. The roundtrip_quotes tests also respects this tweak.omit_blob_tests for DBMS that don’t have a BLOB data type.current_needs_parens – some SQL dialects (e.g., BigQuery) require parentheses for the functions current_date, current_time and current_timestamp.union, for specifying a nonstandard way of combining queries. All union queries now name each column in each subquery (required for bigrquery).dbGetInfo(Result) (rstats-db/DBI#55).dbListFields() (#26).package_name test in test_getting_started().DBI) using R CMD INSTALL before loading DBI (rstats-db/RSQLite#128, #48).dbRemoveTable() instead of issuing DROP requests, the latter might be unsupported.WHERE.dbClearResult() on a closed result set raises a warning.dbFetch() to test_result().can_connect_and_disconnect test.DBI to be in Imports, not in Depends.dbGetException() (rstats-db/DBI#51).RPostgres, RMySQL, RSQLite and RKazam as part of the Travis-CI tests (#52).dbiCheckCompliance(), dbListResults()).testthat.get_info_() tests to use a vector of names.dbBind() againdevtools package from “Imports” to “Suggests”data_ tests to use a worker function test_select()NA values above and below the non-NA value in data_ testsdbBind() and dbClearResult() (#31)dbQuoteString() and dbQuoteIdentifier() (#18)integer as underlying data type (#9)NA to NULL conversion in dbQuoteString(), and false friends (#23)dbQuoteIdentifier() (#30)data.frame() for date and time columns (#10)expect_identical() instead of expect_equal() in many places (#13)on.exit() handlers via expect_error() (#20).test_meta() (#37)dbDataType() (#19)test_all(): Tests are listed in new “Tests” sectionskip()test_all() that runs all tests