Nafta
Creates temporary SQLite database for testing using diesel.
[]
= "0.1"
Minimal example
// Creates empty SQLite database in temporary folder
let test_db = new;
// Work with the connetion
let conn = test_db.conn;
// You can check that database file was really removed
let path = test_db.db_path.clone;
// Necessary to drop anything which can block file
drop;
// Dropping `test_db` to check it was really removed
drop;
assert!;
Example with migration
// Database
extern crate diesel;
extern crate diesel_migrations;
// This macro from `diesel_migrations` defines an `embedded_migrations` module
// containing a function named `run`. This allows the example to be run and
// tested without any outside setup of the database.
embed_migrations!;
Building on windows
See build batch for windows: .github/install-sqlite.bat