Mock DB methods

with_mock_db() start_mock_db() stop_mock_db()

Run DBI queries against a mocked database

with_mock_path()

Run the DBI queries in an alternate mock directory

Capturing fixtures

start_db_capturing() stop_db_capturing() capture_db_requests()

Capture and record database transactions and save them as mocks

Utilities

db_mock_paths() .db_mock_paths()

Set an alternate directory for mock API fixtures

redact_columns()

Redact columns from a dataframe with the default redactors

set_dittodb_debug_level()

Set dittodb's debug level

use_dittodb()

Use dittodb in your tests

DBI methods

dbDisconnect(<DBIMockConnection>) dbExistsTable(<DBIMockConnection>,<character>) dbExistsTable(<DBIMockConnection>,<Id>) dbListTables(<DBIMockConnection>) dbListFields(<DBIMockConnection>,<character>) dbListFields(<DBIMockConnection>,<Id>) dbListFields(<DBIMockConnection>,<ANY>) dbSendQuery(<DBIMockConnection>,<character>) dbFetch(<DBIMockResult>) fetch(<DBIMockResult>,<ANY>) fetch(<DBIMockResult>,<missing>) dbClearResult(<DBIMockResult>) dbHasCompleted(<DBIMockResult>) dbGetQuery(<DBIMockRPostgreSQLConnection>,<character>) dbGetQuery(<DBIMockRPostgreSQLConnection>,<character>) dbGetInfo(<DBIMockConnection>) dbWriteTable(<DBIMockConnection>,<character>,<data.frame>) dbRemoveTable(<DBIMockConnection>,<character>) dbColumnInfo(<DBIMockResult>) dbGetInfo(<DBIMockResult>) dbQuoteIdentifier(<DBIMockRPostgresConnection>,<character>) dbQuoteIdentifier(<DBIMockRPostgresConnection>,<SQL>)

Methods for interacting with DB mocks instead of an actual database

Test DB creation

nycflights_sqlite()

An SQLite connection to a subset of nycflights13

nycflights13_create_sql()

Create a standardised database for testing

nycflights13_create_sqlite()

Create an in-memory SQLite database for testing