cvsuser 05/10/21 08:32:15
Modified: App-Repository/lib/App Repository.pm
App-Repository/lib/App/Repository DBI.pm
Log:
make configured columns the default set of columns for get_hashes() etc. when
no columns specified
Revision Changes Path
1.25 +3 -1 p5ee/App-Repository/lib/App/Repository.pm
Index: Repository.pm
===================================================================
RCS file: /cvs/public/p5ee/App-Repository/lib/App/Repository.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Repository.pm 20 Oct 2005 20:02:13 -0000 1.24
+++ Repository.pm 21 Oct 2005 15:32:13 -0000 1.25
@@ -871,6 +871,8 @@
my ($self, $table) = @_;
my $table_def = $self->{table}{$table};
my $columns = $table_def->{default_columns} || $table_def->{columns};
+ $columns = $table_def->{columns} if ($columns eq "configured");
+ die "Unknown default columns [$columns]" if (ref($columns) ne "ARRAY");
&App::sub_exit($columns) if ($App::trace);
return($columns);
}
1.30 +10 -3 p5ee/App-Repository/lib/App/Repository/DBI.pm
Index: DBI.pm
===================================================================
RCS file: /cvs/public/p5ee/App-Repository/lib/App/Repository/DBI.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- DBI.pm 20 Oct 2005 20:03:17 -0000 1.29
+++ DBI.pm 21 Oct 2005 15:32:15 -0000 1.30
@@ -459,7 +459,14 @@
&App::sub_entry if ($App::trace);
my ($self, $table) = @_;
my $table_def = $self->{table}{$table};
- my $columns = $table_def->{default_columns} ||
$table_def->{phys_columns} || $table_def->{columns};
+ my $columns = $table_def->{default_columns} || $table_def->{columns};
+ if ($columns eq "configured") {
+ $columns = $table_def->{columns};
+ }
+ elsif ($columns eq "physical") {
+ $columns = $table_def->{phys_columns};
+ }
+ die "Unknown default columns [$columns]" if (ref($columns) ne "ARRAY");
&App::sub_exit($columns) if ($App::trace);
return($columns);
}