improve sybase/mssql db_schema detection
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / Sybase.pm
index 6fb0521..5a3b72e 100644 (file)
@@ -44,6 +44,19 @@ sub _rebless {
     }
 }
 
+sub _tables_list {
+    my ($self, $opts) = @_;
+
+    my $dbh = $self->schema->storage->dbh;
+
+    my $sth = $dbh->table_info(undef, $self->db_schema, undef, "'TABLE','VIEW'");
+
+    my @tables = grep $_ ne 'sysquerymetrics',
+              map $_->{table_name}, @{ $sth->fetchall_arrayref({ table_name => 1 }) };
+
+    return $self->_filter_tables(\@tables, $opts);
+}
+
 sub _table_columns {
     my ($self, $table) = @_;