From: Rafael Kitover Date: Sat, 29 Aug 2009 06:11:14 +0000 (+0000) Subject: rename _map_data_type to _native_data_type X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0bd2c1cdd249ba5866529b8316a1764a07a4871f;p=dbsrgits%2FDBIx-Class-Historic.git rename _map_data_type to _native_data_type --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index b9e95c7..b92546c 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -2078,7 +2078,7 @@ sub last_insert_id { $self->dbh_do('_dbh_last_insert_id', @_); } -=head2 _map_data_type +=head2 _native_data_type =over 4 @@ -2104,7 +2104,7 @@ C becomes C. =cut -sub _map_data_type { +sub _native_data_type { #my ($self, $data_type) = @_; return undef } diff --git a/lib/DBIx/Class/Storage/DBI/AutoCast.pm b/lib/DBIx/Class/Storage/DBI/AutoCast.pm index 9eb5245..3391cfb 100644 --- a/lib/DBIx/Class/Storage/DBI/AutoCast.pm +++ b/lib/DBIx/Class/Storage/DBI/AutoCast.pm @@ -23,7 +23,7 @@ statements with values bound to columns or conditions that are not strings will throw implicit type conversion errors. As long as a column L is -defined, and it resolves to a base RDBMS native type via L as +defined, and it resolves to a base RDBMS native type via L as defined in your Storage driver, the placeholder for this column will be converted to: @@ -46,7 +46,7 @@ sub _prep_for_execute { foreach my $bound (@$bind) { my $col = $bound->[0]; - my $type = $self->_map_data_type($col_info->{$col}{data_type}); + my $type = $self->_native_data_type($col_info->{$col}{data_type}); foreach my $data (@{$bound}[1..$#$bound]) { $new_sql .= shift(@sql_part) . diff --git a/t/93autocast.t b/t/93autocast.t index 682755a..4d9eee0 100644 --- a/t/93autocast.t +++ b/t/93autocast.t @@ -20,7 +20,7 @@ use DBIC::SqlMakerTest; int => undef, # no conversion }; - sub _map_data_type { + sub _native_data_type { return $type_map->{$_[1]}; } }