mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
bulk internal extraction fixes and tests; some renaming/refactoring
This commit is contained in:
@@ -269,7 +269,6 @@ Statement& Statement::operator , (const Bulk& bulk)
|
||||
_pImpl->bulkExtractionAllowed() &&
|
||||
_pImpl->bulkBindingAllowed())
|
||||
{
|
||||
Limit l(_pImpl->getExtractionLimit(), false, false);
|
||||
_pImpl->setBulkExtraction(bulk);
|
||||
_pImpl->setBulkBinding();
|
||||
}
|
||||
@@ -280,4 +279,23 @@ Statement& Statement::operator , (const Bulk& bulk)
|
||||
}
|
||||
|
||||
|
||||
Statement& Statement::operator , (BulkFnType)
|
||||
{
|
||||
const Limit& limit(_pImpl->extractionLimit());
|
||||
if (limit.isHardLimit() ||
|
||||
limit.isLowerLimit() ||
|
||||
Limit::LIMIT_UNLIMITED == limit.value())
|
||||
{
|
||||
throw InvalidAccessException("Bulk is only allowed with limited extraction,"
|
||||
"non-hard and zero-based limits.");
|
||||
}
|
||||
|
||||
Bulk bulk(limit);
|
||||
_pImpl->setBulkExtraction(bulk);
|
||||
_pImpl->setBulkBinding();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Data
|
||||
|
||||
Reference in New Issue
Block a user