capture_mockdb | R Documentation |
This is a wrapper for capturing database fixtures with dittodb. It connects to the production database, captures the query, and disconnects from the production database.
capture_mockdb(production_db, mock_db = "./tests/testthat/mock_db/", f)
production_db |
The production database with the full data |
mock_db |
The path to the mock database containing the fixtures for
dittodb. Default is |
f |
The function with SQL calls to be captured with all options set inside. |
Saves fixtures to mock_db/dir/
where dir
is created and
defined by dittodb
based on name of production_db
. For instance, "/mypath/database.sqlite"
becomes "_mypath_database.sqlite/".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.