/[papo]/papo/neb/emf.pl
ViewVC logotype

Diff of /papo/neb/emf.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jlenton, Tue May 6 22:14:24 2003 UTC revision 1.2 by jlenton, Thu May 8 19:42:30 2003 UTC
# Line 76  sub entry_handler Line 76  sub entry_handler
76              $table = $zot->table($table);              $table = $zot->table($table);
77          }          }
78    
79          $field = $table->attr($field);          if ($table and $table->attr($field)) {
80    
81          if ($field =~ /char\((\d+)\)/) {              $field = $table->attr($field);
82              $_->set_att('max_length' => $1);  
83                if ($field =~ /char\((\d+)\)/ and not $_->att('max_length')) {
84                    # agregar el atributo max_length con el valor
85                    # correspondiente para char y varchar (salvo que esté
86                    # agregado)
87    
88                    $_->set_att('max_length' => $1);
89                }
90                elsif ($field =~ /numeric|integer|serial/
91                       and not ( ($_->att('hidden') and $_->att('hidden') !~ /^n/i)
92                                 or $_->att('typecast') )) {
93                    # agregar typecast="number" a entries de tipo serial
94                    # que no sean hidden ni tengan typecast fijado con
95                    # anterioridad
96    
97                    $_->set_att('typecast' => 'number');
98                }
99          }          }
100      }      }
101  }  }
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26