proper parsing, using add_* instead of throwing a whole blob in
[dbsrgits/SQL-Translator-2.0-ish.git] / lib / SQL / Translator / Parser / DBI / SQLite.pm
index e190a22..41447c3 100644 (file)
@@ -1,25 +1,6 @@
 package SQL::Translator::Parser::DBI::SQLite;
-use Moose;
-use SQL::Translator::Types qw(Schema);
-use SQL::Translator::Object::Table;
-with 'SQL::Translator::Parser::DBI::Dialect';
+use Moose::Role;
 
-has 'schema' => (is => 'ro', isa => Schema, default => sub { SQL::Translator::Object::Schema->new( { name => '' }) });
-
-sub _tables_list {
-    my $self = shift;
-
-    my $dbh = $self->dbh;
-    my $sth = $dbh->prepare("SELECT * FROM sqlite_master WHERE type = 'table'");
-    $sth->execute;
-
-    my %tables;
-    while ( my $row = $sth->fetchrow_hashref ) {
-        next if $row->{tbl_name} =~ /^sqlite_/;
-        $tables{$row->{tbl_name}} = SQL::Translator::Object::Table->new( { name => $row->{tbl_name}, schema => $self->schema } );
-    }
-    $sth->finish;
-    return \%tables;
-}
+no Moose;
 
 1;