Re: retrieving only specified fields ?

[prev] [thread] [next] [Date index for 2004/06/18]

From: Heiko Klein
Subject: Re: retrieving only specified fields ?
Date: 15:26 on 18 Jun 2004
I've once written a small wrapper for this problem, since the users of 
my program can automatically decide which columns they want to fetch, 
and preselecting all columns was a bit to overhead, and an extra query 
for each of the several thousand rows was much to slow.

The module makes sure that the change is localized and only temporary:

=head1 SYNOPSIS

   use Class::DBI::TempEssential;

   # $cdbi_table isa Class::DBI table
   my @new_essential = qw/col1 col5 col7/;
   my $tempEssential = new Class::DBI::TempEssential($cdbi_table,
                                                     @new_essential);

   # do what you want to do with this essential setting

   undef $tempEssential; # or get out of my-scope
   # you have your old setting back



If this is of more general interest and nobody claims the namespace of 
Class::DBI::TempEssential, I could upload it to CPAN.

Best regards,

Heiko



retrieving only specified fields ?
"raptor 11:45 on 17 Jun 2004

Re: retrieving only specified fields ?
colm-cdbi 12:23 on 17 Jun 2004

Re: retrieving only specified fields ?
"raptor 15:00 on 17 Jun 2004

Re: retrieving only specified fields ?
colm-cdbi 15:21 on 17 Jun 2004

Re: retrieving only specified fields ?
Simon Cozens 15:24 on 17 Jun 2004

Re: retrieving only specified fields ?
Tony Bowden 15:37 on 17 Jun 2004

Re: retrieving only specified fields ?
Heiko Klein 15:26 on 18 Jun 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52