Test::SQL::DB - Clean database support for SQL::DB
0.971.2. 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.
Mark Lawrence <email@example.com>
Copyright (C) 2011 Mark Lawrence <firstname.lastname@example.org>
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.