Re: Using CDBI with an ORDBMS

[prev] [thread] [next] [Date index for 2005/04/30]

From: merlyn (Randal L. Schwartz)
Subject: Re: Using CDBI with an ORDBMS
Date: 03:36 on 30 Apr 2005
>>>>> "Michael" == Michael Nachbaur <mike@xxxxxxxx.xxx> writes:

Michael> Is there a way of doing this currently with Class::DBI, or do I need
Michael> to create a new module to accomodate this?

I don't think CDBI does this inherently, at least not in anything I've
seen.

Given a row returned from a Pg query, you can map it to its table
name with:

SELECT relname
FROM pg_class
WHERE relfilenode = (SELECT tableoid FROM $yourrow)

So, if you can include tableoid as a return value, you can do the
mapping and reblessing as needed.

I've not tried this... my biggest client has an app with these
records, but I just worked around it with some union queries instead.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Using CDBI with an ORDBMS
Michael Nachbaur 00:16 on 30 Apr 2005

Re: Using CDBI with an ORDBMS
merlyn (Randal L. Schwartz) 03:36 on 30 Apr 2005

Re: Using CDBI with an ORDBMS
Tony Bowden 09:12 on 30 Apr 2005

Re: Using CDBI with an ORDBMS
David Christensen 12:06 on 30 Apr 2005

Re: Using CDBI with an ORDBMS
merlyn (Randal L. Schwartz) 17:44 on 30 Apr 2005

Generated at 10:24 on 04 May 2005 by mariachi v0.52