NEWS.md
Avoid dplyr (#364).
Remove .dots argument to test_select_with_null() (#362).
Prefer map() over lapply() (#361) and map_*() over vapply() (#356).
Bump DBI dependency to fix tests (#359).
Document sources for autogenerated files (#353), add comments to generated code (#358).
Make test names unique, with a numeric suffix (#355).
Align with RSQLite (#351).
Replace unconditional skip with versioned skip (#347).
Consistent use of skip_if_not_dbitest() (#346).
create_roundtrip_keywords and create_roundtrip_quotes tests (#283).Relax specification of dbUnquoteIdentifier(), character vectors are now allowed too.
Specify dbFetchChunk() (#331), dbFetchArrowChunk() (#301) and dbBindArrow() (#328).
Inline all tests for dbBind() (#326).
New allow_na_rows_affected tweak to support NA values returned from dbGetRowsAffected() (#297, #312).
Switch to nanoarrow (#291).
Basic tests for the new db*Arrow() interface (#287).
New skip_if_not_dbitest() (#289).
reexport test uses interface for dev DBI if the backend is compatible with DBItest > 1.7.3.
Remove interface to dblog in the CRAN version.
Use and enable compatibility with testthat edition 3 (#263, #268). Complete removal of expect_is() (@MichaelChirico, #257).
Adapt to new Arrow DBI generics (#265).
Better stack traces for visibility tests.
dbQuoteIdentifier() roundtrip is tested for tables only (@dpprdan, #256).
test_some() also tests a test if it would normally be skipped.
tweaks() gains dbitest_version argument to support targeting a specific version of the DBItest package. The default is 1.7.1 (#236).roundtrip_date_extended, roundtrip_timestamp_extended, append_roundtrip_date_extended and append_roundtrip_timestamp_extended test dates between 1800 and 2999 (#148, #249).quote_literal_empty test (#248).bind_character_escape test for binding special characters (#242).bind_time_minutes_integer test for integer durations.spec_ objects in pkgdown help index, add cross references (#128).value argument to DBI::dbWriteTable() (#235).with_result(), with_remove_test_tables() and with_rollback_on_error() for better error traces (#184, #250, #251, #253).palmerpenguins::penguins instead of iris (#241).testthat::expect_is() and testthat::expect_that() from tests (#231, @michaelquinn32).dbBind().with_remove_test_table() for better stack traces on error (#196). Remove with_*connection() (#193).test_some() shows DBI code via dblog (#217) if dblog = TRUE (#226)."bind_date_integer", "bind_time_seconds" and "bind_time_hours" tests (#218).create_table_as tweak (#131)."roundtrip_time" and "append_roundtrip_time" tests now also test values of class "difftime" with units other than "secs" (#199)."dbit" prefix. Almost all tests now use random table names to avoid collisions and unrelated test failures (#197)."roundtrip_timestamp" tests now accept a time zone set by the database backend (#178, #198)."overwrite_table_missing" test (#210, @martinstuder).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(ctx = ctx, ), with_invalid_connection(ctx = ctx, ), 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).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().testthat dependencytestthat 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)test_all(): Tests are listed in new “Tests” sectionskip()
test_all() that runs all tests