[Rt-commit] r3038 - in DBIx-SearchBuilder/trunk: . SearchBuilder ex/Example/Model t

glasser at bestpractical.com glasser at bestpractical.com
Wed Jun 1 18:23:01 EDT 2005


Author: glasser
Date: Wed Jun  1 18:23:00 2005
New Revision: 3038

Modified:
   DBIx-SearchBuilder/trunk/   (props changed)
   DBIx-SearchBuilder/trunk/SearchBuilder/SchemaGenerator.pm
   DBIx-SearchBuilder/trunk/ex/Example/Model/Address.pm
   DBIx-SearchBuilder/trunk/t/10schema.t
   DBIx-SearchBuilder/trunk/t/testmodels.pl
Log:
 r33724 at tin-foil:  glasser | 2005-06-01 18:17:10 -0400
 Sorry about all the madness. I think everything is good now.


Modified: DBIx-SearchBuilder/trunk/SearchBuilder/SchemaGenerator.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/SchemaGenerator.pm	(original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/SchemaGenerator.pm	Wed Jun  1 18:23:00 2005
@@ -83,7 +83,20 @@
 sub CreateTableSQLStatements {
   my $self = shift;
   # The sort here is to make it predictable, so that we can write tests.
-  return join "\n", map { "$_ ;\n" } sort $self->_db_schema->sql($self->handle->dbh);
+  return sort $self->_db_schema->sql($self->handle->dbh);
+}
+
+=for public_doc CreateTableSQLText
+
+Returns a string containg a sequence of SQL statements to create tables for all of
+the models added to the SchemaGenerator.
+
+=cut
+
+sub CreateTableSQLText {
+  my $self = shift;
+
+  return join "\n", map { "$_ ;\n" } $self->CreateTableSQLStatements;
 }
 
 =for private_doc _DBSchemaTableFromModel MODEL

Modified: DBIx-SearchBuilder/trunk/ex/Example/Model/Address.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/ex/Example/Model/Address.pm	(original)
+++ DBIx-SearchBuilder/trunk/ex/Example/Model/Address.pm	Wed Jun  1 18:23:00 2005
@@ -16,4 +16,4 @@
     }
 }
 
-1;
+1;
\ No newline at end of file

Modified: DBIx-SearchBuilder/trunk/t/10schema.t
==============================================================================
--- DBIx-SearchBuilder/trunk/t/10schema.t	(original)
+++ DBIx-SearchBuilder/trunk/t/10schema.t	Wed Jun  1 18:23:00 2005
@@ -49,7 +49,7 @@
 
     my $ret = $SG->AddModel('Sample::This::Does::Not::Exist');
 
-    ok(!$ret , "couldn't add model from nonexistent class");
+    ok($ret == 0, "couldn't add model from nonexistent class");
 
     like($ret->error_message, qr/Error making new object from Sample::This::Does::Not::Exist/, 
       "couldn't add model from nonexistent class");
@@ -106,4 +106,4 @@
   unshift @_, $b; unshift @_, $a;
   
   goto &is;
-}
+}
\ No newline at end of file

Modified: DBIx-SearchBuilder/trunk/t/testmodels.pl
==============================================================================
--- DBIx-SearchBuilder/trunk/t/testmodels.pl	(original)
+++ DBIx-SearchBuilder/trunk/t/testmodels.pl	Wed Jun  1 18:23:00 2005
@@ -29,4 +29,4 @@
     }
 }
 
-1;
+1;
\ No newline at end of file


More information about the Rt-commit mailing list