some compilation refactoring

This commit is contained in:
Aleksandar Fabijanic
2008-01-22 02:05:04 +00:00
parent 277101a054
commit bc8f7e8680
10 changed files with 69 additions and 59 deletions

View File

@@ -87,14 +87,14 @@ Poco::UInt32 StatementImpl::execute()
if (_lowerLimit > _extrLimit.value())
throw LimitException("Illegal Statement state. Upper limit must not be smaller than the lower limit.");
compile();
do
{
compile();
if (_extrLimit.value() == Limit::LIMIT_UNLIMITED)
lim += executeWithoutLimit();
else
lim += executeWithLimit();
} while (compile());
} while (canCompile());
if (_extrLimit.value() == Limit::LIMIT_UNLIMITED)
_state = ST_DONE;
@@ -145,15 +145,13 @@ Poco::UInt32 StatementImpl::executeWithoutLimit()
}
bool StatementImpl::compile()
void StatementImpl::compile()
{
bool retval = false;
if (_state == ST_INITIALIZED ||
_state == ST_RESET ||
_state == ST_BOUND)
{
retval = compileImpl();
compileImpl();
_state = ST_COMPILED;
if (!extractions().size() && !isStoredProcedure())
@@ -165,8 +163,6 @@ bool StatementImpl::compile()
fixupExtraction();
fixupBinding();
}
return retval;
}