NAME
Test::SQL::DB - Clean database support for SQL::DB
VERSION
0.971.0. Development release.
SYNOPSIS
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();
DESCRIPTION
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.
METHODS
- _clean_database
-
*WARNING* This method EATS YOUR DATA! *WARNING*
Drops all tables, sequences, triggers and functions from the database.
SEE ALSO
AUTHOR
Mark Lawrence <nomad@null.net>
COPYRIGHT AND LICENSE
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.