[Bast-commits] r4281 - DBIx-Class/0.08/trunk/lib/DBIx/Class

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sun Apr 20 23:18:28 BST 2008


Author: ribasushi
Date: 2008-04-20 23:18:28 +0100 (Sun, 20 Apr 2008)
New Revision: 4281

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
Log:
Add a proxy deploy_statements() method executable directly on $schema instead of $schema->storage

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2008-04-20 18:48:28 UTC (rev 4280)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm	2008-04-20 22:18:28 UTC (rev 4281)
@@ -1038,6 +1038,30 @@
   $self->storage->deploy($self, undef, $sqltargs, $dir);
 }
 
+=head2 deployment_statements
+
+=over 4
+
+=item Arguments: $rdbms_type
+
+=back
+
+Returns the SQL statements used by L</deploy> and L<DBIx::Class::Schema/deploy>.
+C<$rdbms_type> provides the DBI database driver name for which the SQL
+statements are produced. If not supplied, the type of the current schema storage
+will be used.
+
+=cut
+
+sub deployment_statements {
+  my ($self, $rdbms_type) = @_;
+
+  $self->throw_exception("Can't generate deployment statements without a storage")
+    if not $self->storage;
+
+  $self->storage->deployment_statements($self, $rdbms_type);
+}
+
 =head2 create_ddl_dir (EXPERIMENTAL)
 
 =over 4




More information about the Bast-commits mailing list