DBIx::ThinSQL::Drop - Clean database support for DBIx::ThinSQL
0.0.44 (2016-05-20) development release.
use DBIx::ThinSQL; use DBIx::ThinSQL::Drop; my $db = DBIx::ThinSQL->connect('dbi:SQLite:dbname=test'); # After this you can run your tests with a freshly # cleaned database. $db->drop_everything();
DBIx::ThinSQL::Drop adds support to DBIx::ThinSQL for cleaning out your database. This is mostly useful when running 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* All of the following methods EAT YOUR DATA! *WARNING*
Drops all functions from the database.
Drops all indexes from the database.
Drops all languages from the database.
Drops all sequences from the database.
Drops all tables from the database.
Drops all triggers from the database.
Drops all views from the database.
Drops all tables, sequences, triggers and functions from the database.
DBIx::ThinSQL
Mark Lawrence <nomad@null.net>
Copyright (C) 2013 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 DBIx::ThinSQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::ThinSQL
CPAN shell
perl -MCPAN -e shell install DBIx::ThinSQL
For more information on module installation, please visit the detailed CPAN module installation guide.