Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Class::DBI

by mugwumpjism (Hermit)
on May 24, 2005 at 01:44 UTC ( #459774=note: print w/ replies, xml ) Need Help??


in reply to Class::DBI

Of course, if you actually want to abstract away your SQL rather than just inlining it, then you can use Tangram for that;

my $r_cd = $storage->remote("Music::CD"); my @cds = $storage->select ( filter => ( ( $r_cd->{artist} eq "Ozzy Osbourne" ) & ( $r_cd->{title}->like("%Crazy") ) & ( $r_cd->{year} <= 1986 ) ), order => $r_cd->{year}, limit => [2, 3] );

This has great advantages in that query filters can be passed around as objects and hence built dynamically, including arbitrary joins.

See the Music Store demo in the Tangram distribution for more examples, including many queries not easily written with Class::DBI.

$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";


Comment on Re: Class::DBI
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://459774]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2014-07-29 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (213 votes), past polls