[Bps-public-commit] dbix-searchbuilder branch, quote-table-names, repushed
Aaron Trevena
ast at bestpractical.com
Mon Sep 7 14:22:19 EDT 2020
The branch quote-table-names was deleted and repushed:
was 74d3f7eab9f14bb649e14fff4c9511aa46d83d22
now 02c3c01590783c0923873b0f857ac356ab5a76ac
1: 78ea626 ! 1: 664c793 Add support for automatic quoting of table names
@@ -214,19 +214,13 @@
@@
- sub Fields {
- my $self = shift;
-- my $table = lc shift;
-+ my $tablename = shift;
-+ my $table = lc $tablename;
-
unless ( $FIELDS_IN_TABLE{$table} ) {
$FIELDS_IN_TABLE{ $table } = [];
- my $sth = $self->dbh->column_info( undef, '', $table, '%' )
- or return ();
-+ my $sth = $self->dbh->column_info( undef, '', $tablename, '%' );
++ my $sth = $self->dbh->column_info( undef, '', $table, '%' );
+ unless ($sth) {
-+ warn "couldn't get column info for $tablename / $table " . $sth->errstr;
++ warn "couldn't get column info for $table " . $sth->errstr;
+ return ();
+ }
my $info = $sth->fetchall_arrayref({});
2: a68a3a6 ! 2: d83f6ae Update tests for mysql 8 and table quoting option
@@ -4,6 +4,18 @@
Update tests to work with mysql 8 reserved words.
Add host/port ENV var options for testing database
+
+diff --git a/t/01records.t b/t/01records.t
+--- a/t/01records.t
++++ b/t/01records.t
+@@
+ skip "ENV is not defined for driver '$d'", TESTS_PER_DRIVER;
+ }
+
++ note("testing $d");
+ my $handle = get_handle( $d );
+ connect_handle( $handle );
+ isa_ok($handle->dbh, 'DBI::db');
diff --git a/t/02searches_function.t b/t/02searches_function.t
--- a/t/02searches_function.t
@@ -201,4 +213,13 @@
User => $ENV{'SB_TEST_MYSQL_USER'} || 'root',
Password => $ENV{'SB_TEST_MYSQL_PASS'} || '',
);
-
+@@
+ Driver => 'Pg',
+ Database => $ENV{'SB_TEST_PG'},
+ User => $ENV{'SB_TEST_PG_USER'} || 'postgres',
++ Host => $ENV{'SB_TEST_PG_HOST'},
++ Port => $ENV{'SB_TEST_PG_PORT'},
+ Password => $ENV{'SB_TEST_PG_PASS'} || '',
+ );
+ }
+
3: 74d3f7e = 3: 02c3c01 Update Changes with quoted table names update
More information about the Bps-public-commit
mailing list