Re: Using CDBI with an ORDBMS
[prev]
[thread]
[next]
[Date index for 2005/04/30]
>>>>> "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!
|
|
Re: Using CDBI with an ORDBMS
merlyn (Randal L. Schwartz) 03:36 on 30 Apr 2005
|