Class::PObject::Driver::sqlite - SQLite Pobject Driver
use Class::PObject; pobject Person => { columns => ['id', 'name', 'email'], driver => 'sqlite', datasource => 'data/website.db' };
Class::PObject::Driver::sqlite is a direct subclass of Class::PObjecet::Driver::DBI. It inherits all the base functionality needed for all the DBI-related classes. For details of these methods and their specifications refer to Class::PObject::Driver and Class::PObject::Driver::DBI.
datasource attribute should be a string pointing to a database file. Multiple objects may have the same datasource, in which case all the related tables will be stored in a single database.
Class::PObject::Driver::sqlite (re-)defines following methods of its own
dbh() base DBI method is overridden with the version that creates a DBI handle using DBD::SQLite datasource attribute.
dbh()
save() - stores/updates the object
save()
If the directory portion of the datasource is missing, it will attempt to create necessary directory tree for you.
If table to store the database is found to be missing, it will attempt to create the a proper table for you. To have more control over how it creates this table, you can fill-in column types using tmap argument.
Class::PObject, Class::PObject::Driver::csv, Class::PObject::Driver::file, Class::PObject::Driver::mysql
For author and copyright information refer to Class::PObject's online manual.
To install Class::PObject, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::PObject
CPAN shell
perl -MCPAN -e shell install Class::PObject
For more information on module installation, please visit the detailed CPAN module installation guide.