Loader bug? Oracle NUMBER datatype.

13 views
Skip to first unread message

Konstantin Tokar

unread,
Jun 17, 2015, 11:51:37 AM6/17/15
to rose-db...@googlegroups.com
In Oracle 11g database:

CREATE TABLE ROUTE ( LONGITUDE NUMBER(14,10) );

Value:
longitude=-174.8466666667

Loader generate:

package ORM::Ships::route;
LONGITUDE              => { type => 'scalar', alias => 'longitude', length => 14, remarks => 'Долгота' },

'length => 14' - length without '-' !!! Must be 'length => 15' ?


Konstantin Tokar

unread,
Jun 18, 2015, 4:11:50 AM6/18/15
to rose-db...@googlegroups.com
package Rose::DB::Object::Metadata::Column::Scalar;

sub init_with_dbi_column_info
{
  my($self, $col_info) = @_;

  $self->SUPER::init_with_dbi_column_info($col_info);

  $self->length($col_info->{'COLUMN_SIZE'});

  return;
}

http://search.cpan.org/~timb/DBI-1.633/DBI.pm:

COLUMN_SIZE: The column size. This is the maximum length in characters for character data types, the number of digits or bits for numeric data types or the length in the representation of temporal types. See the relevant specifications for detailed information.

But sign char '-' not included in this number?
Reply all
Reply to author
Forward
0 new messages