morgon has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a table that I want to represent as a Perl-object via Class::DBI.

The table (in Oracle) looks like this:

create table ringo ( id int primary key, john varchar2(100), paul XmlType )
So one of the columns has XmlType and I want that column to be inflated as an object of itself.

The problem now is that in order to retrieve the xml stored in the "paul"-attribute I have to use a ORA_XMLTYPE (here are some details) and I can't see how to incorporate that into Class::DBI without supplying the whole SQL myself.

So my question is this:

Is there a way to retrieve the XML in the paul-column and use it to inflate the column to an object of it's own without doing everything myself?

Many thanks!

Replies are listed 'Best First'.
Re: Class::DBI and Oracle XmlType
by perrin (Chancellor) on Apr 29, 2009 at 13:44 UTC
    You'll have to play with it, but if you look in the source of Class::DBI you'll see some basic queries it uses that you can override in your class. That, combined with standard inflate/deflate code might be enough. Also, I suggest looking at examples on the Class::DBI wiki and possibly moving this question to the Class::DBI mailing list where there are more people who can help.