[Dbix-class] Get table name from ResultSet class?
lwk at rentrak.com
Tue Sep 13 00:28:11 GMT 2011
I'm pretty new to DBIx::Class. I'm working on a project where I'm mainly
using DBIx::Class as a way to get metadata for the tables, then use that to
generate DDL. The DDL I'm generating is kind of complex and isn't handled
very well by SQL::Abstract.
I tried hanging code off of the Result classes to generate the DDL, and that
works fine, except it means I have to import the Result classes directly,
and then they were not connected to a database, so they couldn't provide a
So instead I tried getting a ResultSource or ResultSet from the schema that
was already connected to a database. But then I don't have access to the
methods I added to the Result object.
So I tried creating a parallel set of ResultSet objects and adding my custom
methods there. Then I was able to access the methods from the ResultSet, but
they could no longer access the table method to get the table name.
How can I get the table name from the ResultSet? Is it purposely hidden?
Lyle Kopnicky | Software Developer
503.284.7581 x260 | lwk at rentrak.com <axc at rentrak.com>
RENTRAK | www.rentrak.com | NASDAQ: RENT
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the DBIx-Class