NAME

Class::PObject::Driver::sqlite - SQLite Pobject Driver

SYNOPSIS

use Class::PObject;
pobject Person => {
    columns => ['id', 'name', 'email'],
    driver  => 'sqlite',
    datasource => 'data/website.db'
};

DESCRIPTION

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

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.

METHODS

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.

  • save() - stores/updates the object

NOTES

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.

SEE ALSO

Class::PObject, Class::PObject::Driver::csv, Class::PObject::Driver::file, Class::PObject::Driver::mysql

COPYRIGHT AND LICENSE

For author and copyright information refer to Class::PObject's online manual.