Skip to content
yuki-kimoto edited this page Nov 21, 2012 · 1 revision

Get list of data type

DBIx::Custom Documents >

Get list of data types in database by available_datatype method.

print $dbi->available_datatype;

These data type is got by the following logic.

for my $i (-1000 .. 1000) {
  $dbh->type_info($i);
  my $data_type = $type_info->{DATA_TYPE};
}

Note that these values are similar as TYPE attribute of statement handle, but these values are not exactly-match.

$sth->{TYPE}

If you know correct data type, you use show_datatype method.

Clone this wiki locally