|FETCHSIZE / $FetchsizeWarn|
Some operations in Perl (i.e.
foreach, assigning arrays) need to know the size
of the whole array. When Perl needs to know the size of an array it call the method
FETCHSIZE. Since not all DBD drivers/DBMS returns the number of selected rows
after an SQL
SELECT, the only way to really determine the number of selected
rows would be to fetch them all from the DBMS. Since this could cause a lot of work, it
may be very inefficent. Therefore DBIx::Recordset by default calls die()
when Perl calls
FETCHSIZE. If you know your DBD drivers returns the correct value in
after the execution of an
SELECT, you can set
$FetchsizeWarn to zero to let
FETCHSIZE return the value from
rows. Setting it to 1 will cause
DBIx::Recordset to only issue a warning, but perform the operation.
NOTE: Since I don't have enough experience with the behaviour of this
feature with different DBMS, this is considered experimental.