mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
Add ODBC DirectExec public API (#3502)
* ODBC sqlDirectExec * doc * Small fix * Fix tabs, add missing const, fix style * Add test case * Small fixes * suggested fix for async * test for returned values
This commit is contained in:
@@ -136,6 +136,23 @@ std::size_t Statement::execute(bool reset)
|
||||
else throw InvalidAccessException("Statement still executing.");
|
||||
}
|
||||
|
||||
void Statement::executeDirect(const std::string& query)
|
||||
{
|
||||
Mutex::ScopedLock lock(_mutex);
|
||||
bool isDone = done();
|
||||
if (initialized() || paused() || isDone)
|
||||
{
|
||||
|
||||
if (!isAsync())
|
||||
{
|
||||
if (isDone) _pImpl->reset();
|
||||
return _pImpl->executeDirect(query);
|
||||
}
|
||||
else throw InvalidAccessException("Cannot be executed async.");
|
||||
}
|
||||
else throw InvalidAccessException("Statement still executing.");
|
||||
}
|
||||
|
||||
|
||||
const Statement::Result& Statement::executeAsync(bool reset)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user