add ::DBI::_is_integer_type and use for SQLite topic/is_int_type
authorRafael Kitover <rkitover@cpan.org>
Sat, 14 Apr 2012 16:31:24 +0000 (12:31 -0400)
committerRafael Kitover <rkitover@cpan.org>
Tue, 17 Apr 2012 20:05:59 +0000 (16:05 -0400)
commitc50a1dbf78971156bebf1c73020f48a6a647683a
tree20038a9471749b8e1fad18d58baa3635ac32bfa7
parentacdfdae0d491959352c5291b867ef0d32b7ece5e
add ::DBI::_is_integer_type and use for SQLite

Add _is_integer_type to check whether a data_type is an integer type
from any database, like we already have _is_lob_type. Use it for the
SQL_INTEGER bind in the SQLite driver.

Also for ::SQLite check for a generic numeric type with a zero scale
such as NUMBER(38,0) and make it a SQL_INTEGER bind.

Move the ::SQLite integer type checks into _resolve_bindattrs in order
to cache the result of the check in the column_info, since the regexes
are very hairy.
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/SQLite.pm
t/752sqlite.t