Test::SQL::DB - Clean database support for SQL::DB
0.971.0. Development release.
use SQL::DB; use Test::More; use Test::SQL::DB; my $db = SQL::DB->connect('dbi:SQLite:dbname=test'); # After this you can run your tests with a freshly # cleaned database. $db->_clean_database();
Test::SQL::DB adds support to SQL::DB for cleaning out your database. This is mostly useful when running SQL::DB related tests with something like Test::Database where you don't know who was doing what with your test database.
This module currently only works with SQLite and PostgreSQL databases.
*WARNING* This method EATS YOUR DATA! *WARNING*
Drops all tables, sequences, triggers and functions from the database.
SQL::DB, Moo::Role
Mark Lawrence <nomad@null.net>
Copyright (C) 2011 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
To install SQL::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::DB
CPAN shell
perl -MCPAN -e shell install SQL::DB
For more information on module installation, please visit the detailed CPAN module installation guide.