Object::Relation::Setup::DB::SQLite - Object::Relation SQLite data store setup
See Object::Relation::Setup.
This module inherits from Object::Relation::Setup::DB to build a SQLite set up store.
my $sqlite_setup = Object::Relation::Setup::DB::SQLite->new(\%params);
The constructor inherits from Object::Relation::Setup::DB, but detects when the dsn attribute isn't set, and sets it to a default value. The database file in that value will be obj_rel.db and will live in the directory returned by File::Temp::tempdir().
dsn
File::Temp::tempdir()
DBI->connect( $dsn, $user, $pass, { Object::Relation::Setup::DB::SQLite->connect_attrs } );
Returns a list of arugments to be used in the attributes hash passed to the DBI connect() method. Overrides that provided by Object::Relation::Setup::DB to add unicode => 1.
connect()
unicode => 1
$setup->setup;
Sets up the data store. This implementation simply constructs a database handle and assigns it to the dbh attribute, and then calls SUPER::setup() to let Object::Relation::Setup::DB handle the bulk of the work.
dbh
SUPER::setup()
$kbs->teardown;
Tears down the database by disconnecting all database connections and deleting the database file, which is extracted from the DSN.
Copyright (c) 2004-2006 Kineticode, Inc. <info@obj_relode.com>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Object::Relation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::Relation
CPAN shell
perl -MCPAN -e shell install Object::Relation
For more information on module installation, please visit the detailed CPAN module installation guide.