use Text::Balanced qw( extract_bracketed );
use Class::C3;
-our $VERSION = '0.05003';
+our $VERSION = '0.06000';
=head1 NAME
}
sub _extra_column_info {
- my ($self, $table, $col_name, $sth, $col_num) = @_;
- ($table, $col_name) = @{$table}{qw/TABLE_NAME COLUMN_NAME/} if ref $table;
+ my ($self, $table, $col_name, $info, $dbi_info) = @_;
my %extra_info;
my $dbh = $self->schema->storage->dbh;
my $has_autoinc = eval {
- my $get_seq = $self->{_cache}->{sqlite_sequence}
+ my $get_seq = $self->{_cache}{sqlite_sequence}
||= $dbh->prepare(q{SELECT count(*) FROM sqlite_sequence WHERE name = ?});
$get_seq->execute($table);
my ($ret) = $get_seq->fetchrow_array;
}
sub _tables_list {
- my $self = shift;
+ my ($self, $opts) = @_;
my $dbh = $self->schema->storage->dbh;
my $sth = $dbh->prepare("SELECT * FROM sqlite_master");
$sth->execute;
my @tables;
while ( my $row = $sth->fetchrow_hashref ) {
- next unless lc( $row->{type} ) eq 'table';
+ next unless $row->{type} =~ /^(?:table|view)\z/i;
next if $row->{tbl_name} =~ /^sqlite_/;
push @tables, $row->{tbl_name};
}
$sth->finish;
- return @tables;
+ return $self->_filter_tables(\@tables, $opts);
}
=head1 SEE ALSO