rename method and add docs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI.pm
index d461a0f..b9e95c7 100644 (file)
@@ -2078,12 +2078,36 @@ sub last_insert_id {
   $self->dbh_do('_dbh_last_insert_id', @_);
 }
 
-# By default there is no resolution of DBIC data types to DBI data types
-# In essence this makes e.g. AutoCast a noop
-sub _dbi_data_type {
+=head2 _map_data_type
+
+=over 4
+
+=item Arguments: $type_name
+
+=back
+
+This API is B<EXPERIMENTAL>, will almost definitely change in the future, and
+currently only used by L<::AutoCast|DBIx::Class::Storage::DBI::AutoCast> and
+L<::Sybase|DBIx::Class::Storage::DBI::Sybase>.
+
+The default implementation returns C<undef>, implement in your Storage driver if
+you need this functionality.
+
+Should map types from other databases to the native RDBMS type, for example
+C<VARCHAR2> to C<VARCHAR>.
+
+Types with modifiers should map to the underlying data type. For example,
+C<INTEGER AUTO_INCREMENT> should become C<INTEGER>.
+
+Composite types should map to the container type, for example
+C<ENUM(foo,bar,baz)> becomes C<ENUM>.
+
+=cut
+
+sub _map_data_type {
   #my ($self, $data_type) = @_;
   return undef
-};
+}
 
 =head2 sqlt_type