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

@@ -95,15 +95,16 @@ 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 can compile.
void compileImpl();
/// Compiles the statement, doesn't bind yet.
/// Returns true if the statement was succesfully compiled.
/// The way SQLite handles batches of statmeents is by compiling
/// one at a time and returning a pointer to the next one.
/// The remainder of the statement is remebered in a string
/// buffer pointed to by _pLeftover member. Non-zero _pLeftover
/// pointing to an empty string means no more statements left
/// to compile.
/// The remainder of the statement is kept in a string
/// buffer pointed to by _pLeftover member.
void bindImpl();
/// Binds parameters
@@ -139,6 +140,7 @@ private:
BindIt _bindBegin;
bool _canBind;
bool _isExtracted;
bool _canCompile;
};
@@ -163,6 +165,12 @@ inline bool SQLiteStatementImpl::canBind() const
}
inline bool SQLiteStatementImpl::canCompile() const
{
return _canCompile;
}
} } } // namespace Poco::Data::SQLite