[CDBI] Write out CDBI modules from Loader and Loader::Relationship
Randal L. Schwartz
merlyn at stonehenge.com
Fri Jan 27 03:17:39 GMT 2006
>>>>> "John" == John Li <johnli at accessmedia.tv> 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?
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <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!
More information about the ClassDBI