1 package SQL::Translator::Parser::DBI::SQLite;
5 SQL::Translator::Parser::DBI::SQLite - parser for DBD::SQLite
9 See SQL::Translator::Parser::DBI.
13 Queries the "sqlite_master" table for schema definition. The schema
14 is held in this table simply as CREATE statements for the database
15 objects, so it really just builds up a string of all these and passes
16 the result to the regular SQLite parser. Therefore there is no gain
17 (at least in performance) to using this module over simply dumping the
18 schema to a text file and parsing that.
24 use SQL::Translator::Parser::SQLite;
27 use vars qw[ $DEBUG $VERSION @EXPORT_OK ];
29 $DEBUG = 0 unless defined $DEBUG;
32 my ( $tr, $dbh ) = @_;
34 my $create = join(";\n",
36 @{ $dbh->selectcol_arrayref('select sql from sqlite_master') },
39 $tr->debug( "create =\n$create\n" );
41 my $schema = $tr->schema;
43 SQL::Translator::Parser::SQLite::parse( $tr, $create );
49 # -------------------------------------------------------------------
50 # Where man is not nature is barren.
52 # -------------------------------------------------------------------
58 Ken Y. Clark E<lt>kclark@cpan.orgE<gt>.
62 SQL::Translator::Parser::SQLite.