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

@@ -83,7 +83,10 @@ protected:
bool canBind() const;
/// Returns true if a valid statement is set and we can bind.
bool compileImpl();
bool canCompile() const;
/// Returns true if statement was not compiled.
void compileImpl();
/// Compiles the statement, doesn't bind yet
void bindImpl();
@@ -96,9 +99,10 @@ protected:
/// Returns the concrete binder used by the statement.
private:
Poco::SharedPtr<Binder> _ptrBinder;
Poco::SharedPtr<Extractor> _ptrExtractor;
Poco::SharedPtr<Binder> _ptrBinder;
Poco::SharedPtr<Extractor> _ptrExtractor;
Poco::SharedPtr<Preparation> _ptrPrepare;
bool _compiled;
};
@@ -123,6 +127,12 @@ inline Poco::UInt32 TestStatementImpl::affectedRowCount() const
}
inline bool TestStatementImpl::canCompile() const
{
return !_compiled;
}
} } } // namespace Poco::Data::Test