Lines 248-254
Get the Primary Key field names of the table
Link Here
|
248 |
|
248 |
|
249 |
=cut |
249 |
=cut |
250 |
|
250 |
|
251 |
sub GetPrimaryKeys($) { |
251 |
sub GetPrimaryKeys { |
252 |
my $tablename=shift; |
252 |
my $tablename=shift; |
253 |
my $hash_columns=_get_columns($tablename); |
253 |
my $hash_columns=_get_columns($tablename); |
254 |
return grep { $hash_columns->{$_}->{'Key'} =~/PRI/i} keys %$hash_columns; |
254 |
return grep { $hash_columns->{$_}->{'Key'} =~/PRI/i} keys %$hash_columns; |
Lines 284-290
With
Link Here
|
284 |
|
284 |
|
285 |
=cut |
285 |
=cut |
286 |
|
286 |
|
287 |
sub _get_columns($) { |
287 |
sub _get_columns { |
288 |
my ($tablename) = @_; |
288 |
my ($tablename) = @_; |
289 |
unless ( exists( $hashref->{$tablename} ) ) { |
289 |
unless ( exists( $hashref->{$tablename} ) ) { |
290 |
my $dbh = C4::Context->dbh; |
290 |
my $dbh = C4::Context->dbh; |
Lines 314-320
If it is not for research purpose, filter primary keys
Link Here
|
314 |
|
314 |
|
315 |
=cut |
315 |
=cut |
316 |
|
316 |
|
317 |
sub _filter_columns ($$;$) { |
317 |
sub _filter_columns { |
318 |
my ($tablename,$research, $filtercolumns)=@_; |
318 |
my ($tablename,$research, $filtercolumns)=@_; |
319 |
if ($filtercolumns){ |
319 |
if ($filtercolumns){ |
320 |
return (@$filtercolumns); |
320 |
return (@$filtercolumns); |
321 |
- |
|
|