Re: [CDBI] Write out CDBI modules from Loader and Loader::Relationship

[prev] [thread] [next] [Date index for 2006/01/27]

From: Matt S Trout
Subject: Re: [CDBI] Write out CDBI modules from Loader and Loader::Relationship
Date: 13:42 on 27 Jan 2006
On Thu, Jan 26, 2006 at 07:17:39PM -0800, Randal L. Schwartz wrote:
> >>>>> "John" == John Li <johnli@xxxxxxxxxxx.xx> writes:
> 
> John> Is there a CPAN module to generate CDBI table definitions automatically
> John> such as results from Class::DBI::Loader and
> John> Class::DBI::Loader::Relationship? If not, I don't mind to write another
> John> one which uses those 2 modules when I have time.
> 
> John> I'd like to examine the results and add things like triggers. I may also
> John> like to run CDBI from non mod_perl environment.
> 
> John> Tim Bunce had a 'define_columns' method which makes it easier to define
> John> all table columns but I don't think he submitted it. Even with that,
> John> it's too time consuming to define hundreds of tables.
> 
> I have code that runs Class::DBI::Loader's moral equivalent
> (the code I wrote for a magazine column) and then walks the table
> definitions to dump out all the has_a and has_many as Perl code.
> 
> Is that what you're looking for?

Won't passing debug => 1 to Loader cause it to dump out the column and
relationship definitions anyway?

There's also a Class::DBI producer for SQL::Translator (though it doesn't
preserve nearly as much metadata as the one included in the latest DBIx::Class
dev releases)

        -- 
             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/ +

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

(message missing)

Re: [CDBI] Write out CDBI modules from Loader and Loader::Relationship
merlyn (Randal L. Schwartz) 03:17 on 27 Jan 2006

Re: [CDBI] Write out CDBI modules from Loader and Loader::Relationship
Matt S Trout 13:42 on 27 Jan 2006

Re: [CDBI] Write out CDBI modules from Loader and Loader::Relationship
merlyn (Randal L. Schwartz) 18:01 on 27 Jan 2006

Generated at 11:37 on 31 Jan 2006 by mariachi v0.52