From: Ken Youens-Clark Date: Thu, 9 Oct 2003 21:51:08 +0000 (+0000) Subject: Fixing up "view_field" to use all the field attributes. X-Git-Tag: v0.04~89 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37b15d8c38751b7f03405626fd180a05dfd423af;p=dbsrgits%2FSQL-Translator.git Fixing up "view_field" to use all the field attributes. --- diff --git a/lib/SQL/Translator/Producer/YAML.pm b/lib/SQL/Translator/Producer/YAML.pm index 7c54273..408f361 100644 --- a/lib/SQL/Translator/Producer/YAML.pm +++ b/lib/SQL/Translator/Producer/YAML.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::YAML; # ------------------------------------------------------------------- -# $Id: YAML.pm,v 1.3 2003-10-08 22:46:17 kycl4rk Exp $ +# $Id: YAML.pm,v 1.4 2003-10-09 21:51:08 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 darren chamberlain , # Ken Y. Clark . @@ -23,7 +23,7 @@ package SQL::Translator::Producer::YAML; use strict; use vars qw($VERSION); -$VERSION = sprintf "%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/; use YAML qw(Dump); @@ -72,11 +72,15 @@ sub view_field { my $field = shift; return { - 'order' => scalar $field->order, - 'name' => scalar $field->name, - 'type' => scalar $field->data_type, - 'size' => [ $field->size ], - 'extra' => { $field->extra }, + 'order' => scalar $field->order, + 'name' => scalar $field->name, + 'data_type' => scalar $field->data_type, + 'size' => [ $field->size ], + 'default_value' => scalar $field->default_value, + 'is_nullable' => scalar $field->is_nullable, + 'is_primary_key' => scalar $field->is_primary_key, + 'is_unique' => scalar $field->is_unique, + 'extra' => { $field->extra }, }; }