Warn about non-integer values for all integer bind types, not just SQL_INTEGER
Dagfinn Ilmari Mannsåker [Tue, 8 Oct 2013 12:02:23 +0000 (13:02 +0100)]
lib/DBIx/Class/Storage/DBI/SQLite.pm

index 9bd51a4..4ce820c 100644 (file)
@@ -273,7 +273,9 @@ sub _dbi_attrs_for_bind {
         and
       defined $bind->[$i][1]
         and
-      $bindattrs->[$i] eq DBI::SQL_INTEGER()
+      grep { $bindattrs->[$i] eq $_ } (
+        DBI::SQL_INTEGER(), DBI::SQL_TINYINT(), DBI::SQL_SMALLINT(), DBI::SQL_BIGINT()
+      )
         and
       $bind->[$i][1] !~ /^ [\+\-]? [0-9]+ (?: \. 0* )? $/x
     ) {