Class::DBI::SQLite - Extension to Class::DBI for sqlite
Contents
Description
Class::DBI::SQLite is an extension to Class::DBI for DBD::SQLite. It allows you to populate an auto-
incremented row id after insert.
The "set_up_table" method automates the setup of columns and primary key(s) via the SQLite PRAGMA
statement.
Name
Class::DBI::SQLite - Extension to Class::DBI for sqlite
See Also
Class::DBI, DBD::SQLite
perl v5.36.0 2022-12-10 Class::DBI::SQLite(3pm)
Synopsis
package Film;
use base qw(Class::DBI::SQLite);
__PACKAGE__->set_db('Main', 'dbi:SQLite:dbname=dbfile', '', '');
__PACKAGE__->set_up_table('Movies');
package main;
my $film = Film->create({
name => 'Bad Taste',
title => 'Peter Jackson',
});
my $id = $film->id; # auto-incremented
