[Dbix-class] RFC: Load from SQL
jeff at vpservices.com
Tue Jul 10 19:20:25 GMT 2007
Hi all (and especially Brandon Black),
Jeff Zucker (jZed), here (author/maintainer of DBD::CSV, DBD::AnyData,
SQL::Statement and various other DBI related modules). I wanted a DBIC
loader that would work with the DBDs that do not store metadata (other
than column names) so I wrote a little wrapper around SQL::Translator
and DBIx::Class::File that will parse DDL on the fly, create DBIC schema
classes in memory (and optionally to file).
In addition to serving as a loader for DBD::CSV etc. this wrapper
supports file-less prototyping of schemas for any DBD. You can just
feed it SQL statements (DDL and optionally also DML) to create and
populate a test schema and begin using DBIx::Class on it directly
without creating any module files (and if you use temp tables, without
any db footprint either).
The module and a working sample script can be found at
Castaway tells me that Matt suggested this should be named something
like DBIx::Class::Schema::Loader::SQL. Should I release this as a
separate module or (as I'd prefer) just submit it as a patch to
DBIx::Class::Schema::Loader? If the latter, what version should I patch
P.S. It won't work with DBD::CSV etc. yet, I need to release the next
version of SQL::Statement for that.
More information about the Dbix-class