|
Re: DDL from classes: msg#00077lang.perl.modules.dbi.rose-db-object
On 6/29/06, Sean Davis <sdavis2-2loH/HJHQuifRvmTrFJqzg@xxxxxxxxxxxxxxxx> wrote: > Are you planning on methods for generating DDL from classes? Just curious. It's on my list, but it's low priority because most non-trivial db schemas will contain constructs that cannot survive a round-trip through RDBO. Column constraints or database triggers that include arbitrary procedural code in the database, for example, cannot be converted to the "Perl equivalent" by the auto-init system in RDBO. These things would therefore be lost in a round-trip. That said, for simple schemas, creating SQL from an RDBO class should definitely be possible. When I do it, I plan to leverage SQL::Translator, if possible. If anyone else wants to work on this bit, I think it mostly involves writing code for the SQL::Translator module, with only trivial hooks in RDBO. The usage would look like this: print Foo->meta->sql_table_definition($db); where $db is a Rose::DB-derived object used to determine the SQL syntax (MySQL, Pg, etc.) -John Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: default values, John Siracusa |
|---|---|
| Next by Date: | Re: default values, Jonathan Vanasco |
| Previous by Thread: | DDL from classes, Sean Davis |
| Next by Thread: | internally cached information, Jonathan Vanasco |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |