NAME
DBIO::MSSQL::Storage::StopAtFirstError - A statement handle whose execute_for_fetch stops at the first failing tuple
VERSION
version 0.900004
DESCRIPTION
The statement handle "_dbh_execute_for_fetch" in DBIO::MSSQL::Storage hands to core's void-context populate. It is a thin wrapper that passes every method on to the real handle and changes one thing: execute_for_fetch stops after the first tuple that failed.
DBI's execute_for_fetch executes every tuple, whatever became of the one before, and reports the failures in the tuple status. SQL Server rolls the whole transaction back on some statement errors (Msg 8114, a bound value that cannot be converted: @@TRANCOUNT goes from 1 to 0 on the failing statement), so the tuples after the failing one run with no transaction, in autocommit, and are committed, while the ones before it went with the transaction. A populate that threw then left some of its rows, the ones after the bad one. Stopping at the first failure leaves nothing of the data set behind.
METHODS
execute_for_fetch
As DBI's, except that $fetch_tuple is not called again once the last entry of the tuple status is an error (an array reference).
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.