[Dbix-class] "table" methods in schemas?

Mike Rylander mrylander at gmail.com
Wed Feb 1 21:43:57 CET 2006


On 2/1/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> On Wed, Feb 01, 2006 at 01:29:57PM +0000, Mike Rylander wrote:
> > On 1/31/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > [snip]
> > >
> > > I've been wondering whether it might not be cool to have something where
> > > during creation, a ResultSource will check to see if (for a result_class
> > > of MyDB::Foo) there's a MyDB::FooSet class, and if so use that as its
> > > default resultset_class instead of DBIx::Class::ResultSet.
> > >
> > > But I dunno, and there's about 3 million different possible naming
> > > convention you could use, which leads me to expect either a holy war or
> > > needing to implement something like RDBO's ConventionManager if I try it.
> > >
> > > Anybody got any suggestions?
> >
> > How about
> >
> >   MyDB::Foo->resultset_manager('MyDB::FooSet');
>
> __PACKAGE__->result_source_instance->resultset_class('MyDB::FooSet');
>
> would already work. I wasn't asking about that, I was asking about some
> sort of "automatic defaulting" so people can easily create and use custom
> resultsets in a standard way without the extra boilerplate.

Oh.  Duh :P ... /me slinks away after reading the docs.

>
> --
>      Matt S Trout       Offering custom development, consultancy and support
>   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
> Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information
>
>  + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
>
> _______________________________________________
> List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
>


--
Mike Rylander
mrylander at gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org



More information about the Dbix-class mailing list