package Oryx::DBI::Util::SQLite; use base qw(Oryx::DBI::Util); our %SQL_TYPES = ( 'Oid' => 'integer PRIMARY KEY AUTOINCREMENT', 'Integer' => 'integer', 'String' => 'text', 'Text' => 'text', 'Binary' => 'blob', 'Float' => 'real', 'Boolean' => 'integer', 'DateTime' => 'text', ); sub type2sql { my ($self, $type, $size) = @_; my $sql_type = $SQL_TYPES{$type}; return $sql_type; } # Columns may not be dropped in SQLite. Oh, well. sub column_drop { } sub table_exists { my ($self, $dbh, $table) = @_; my $sth = $dbh->table_info('%', '%', $table); $sth->execute(); my @rv = @{$sth->fetchall_arrayref}; $sth->finish; return grep { lc $_->[2] eq lc $table } @rv; } 1; =head1 NAME Oryx::DBI::Util::SQLite - Oryx DBI utilities for SQLite connections =head1 DESCRIPTION This provides an Oryx DBI utility class for use with L. =head1 SEE ALSO L, L =head1 AUTHORS Richard Hundt Erichard NO SPAM AT protea-systems.comE Andrew Sterling Hanenkamp Ehanenkamp@cpan.orgE =head1 COPYRIGHT AND LICENSE Copyrright (c) 2005 Richard Hundt. This library is free software and may be used under the same terms as Perl itself. =cut