help pod test pass
Justin Hunter [Sat, 19 Sep 2009 16:45:18 +0000 (09:45 -0700)]
lib/SQL/Translator/Producer/SQL/MySQL.pm
lib/SQL/Translator/Producer/SQL/PostgreSQL.pm
lib/SQL/Translator/Producer/SQL/SQLite.pm

index 84cb9fb..fddb8c0 100644 (file)
@@ -463,17 +463,16 @@ role SQL::Translator::Producer::SQL::MySQL {
     
         # Default?  XXX Need better quoting!
         my $default = $field->default_value;
-=cut
-        if ( defined $default ) {
-            SQL::Translator::Producer->_apply_default_value(
-              \$field_def,
-              $default, 
-              [
-                'NULL'       => \'NULL',
-              ],
-            );
-        }
-=cut
+
+#        if ( defined $default ) {
+#            SQL::Translator::Producer->_apply_default_value(
+#              \$field_def,
+#              $default, 
+#              [
+#                'NULL'       => \'NULL',
+#              ],
+#            );
+#        }
     
         if ( my $comments = $field->comments ) {
             $field_def .= qq[ comment '$comments'];
index 4a4530e..69b0d4d 100644 (file)
@@ -406,19 +406,18 @@ method create_view(View $view, $options?) {
         # Default value 
         #
         my $default = $field->default_value;
-=cut
-        if ( defined $default ) {
-            SQL::Translator::Producer->_apply_default_value(
-              \$field_def,
-              $default,
-              [
-                'NULL'              => \'NULL',
-                'now()'             => 'now()',
-                'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',
-              ],
-            );
-        }
-=cut
+
+#        if ( defined $default ) {
+#            SQL::Translator::Producer->_apply_default_value(
+#              \$field_def,
+#              $default,
+#              [
+#                'NULL'              => \'NULL',
+#                'now()'             => 'now()',
+#                'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',
+#              ],
+#            );
+#        }
 
         #
         # Not null constraint
@@ -521,15 +520,14 @@ method create_constraint(Constraint $c, $options?) {
             $def .= ' MATCH ' . ( $c->match_type =~ /full/i ) ? 'FULL' : 'PARTIAL';
         }
 
-=cut
-        if ( $c->on_delete ) {
-            $def .= ' ON DELETE '.join( ' ', $c->on_delete );
-        }
+#        if ( $c->on_delete ) {
+#            $def .= ' ON DELETE '.join( ' ', $c->on_delete );
+#        }
+
+#        if ( $c->on_update ) {
+#            $def .= ' ON UPDATE '.join( ' ', $c->on_update );
+#        }
 
-        if ( $c->on_update ) {
-            $def .= ' ON UPDATE '.join( ' ', $c->on_update );
-        }
-=cut
         if ( $c->deferrable ) {
             $def .= ' DEFERRABLE';
         }
index 6cc276b..7a3df33 100644 (file)
@@ -268,19 +268,18 @@ method create_field(Column $field, $options?) {
 
     # Default?  XXX Need better quoting!
     my $default = $field->default_value;
-=cut
-    if (defined $default) {
-        SQL::Translator::Producer->_apply_default_value(
-            \$field_def,
-            $default, 
-            [
-             'NULL'              => \'NULL',
-             'now()'             => 'now()',
-             'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',
-            ],
-        );
-    }
-=cut
+
+#    if (defined $default) {
+#        SQL::Translator::Producer->_apply_default_value(
+#            \$field_def,
+#            $default, 
+#            [
+#             'NULL'              => \'NULL',
+#             'now()'             => 'now()',
+#             'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',
+#            ],
+#        );
+#    }
 
     return $field_def;