[CDBI] Can CDBI do this?

Ben Lavender blavender at gmail.com
Thu Jan 19 21:11:10 GMT 2006

Hello everyone,

I've been using cdbi for a while, but have to jump on to someone
else's work for something.  Long story short, I've got to do some
multi-table searches of a sort I haven't done before.

For purposes of illustration, I have 2 tables, events and
certifications.  An event row has a field, cert, which is a primary
key id of a row on the certs table.  In CDBI speak, a CDBI::Event
has_a CDBI::Cert.

Long story short, I need to run a query that looks like this:

SELECT events.(essential) FROM   events, certs WHERE  ( events.duedate
< "2999-01-01" AND certs.id = events.cert AND certs.type = "Some
String I Input") ORDER BY dueDate LIMIT 10;

Can CDBI or one of it's nifty associated classes do this without
resorting to messey, maintenance-error-prone set_sql and the like?
The CDBI:AbstractSearch docs would seem to point to 'no'.  I'll manage
if not, but I don't want to start doing something I'm going to kick
myself for later.


Note:  Initially sent to list before joining and bounced.  Apologies
should a duplicate appear.

More information about the ClassDBI mailing list