mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Giving access to the list of registered statements
This commit is contained in:
parent
4274b662a6
commit
b17ea542d4
@ -59,7 +59,7 @@ void Database::registerStatement(Statement& aStatement) // throw(SQLite::Excepti
|
||||
// Unregister a Statement object
|
||||
void Database::unregisterStatement(Statement& aStatement) // throw(SQLite::Exception)
|
||||
{
|
||||
std::vector<Statement*>::iterator iStatement;
|
||||
TStatementList::iterator iStatement;
|
||||
iStatement = std::find(mStatementList.begin(), mStatementList.end(), &aStatement);
|
||||
if (mStatementList.end() != iStatement)
|
||||
{
|
||||
|
@ -31,6 +31,9 @@ class Database
|
||||
{
|
||||
friend class Statement;
|
||||
|
||||
public:
|
||||
typedef std::vector<Statement*> TStatementList; /// List of statements pointers
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Open the provided database UTF-8 filename.
|
||||
@ -73,6 +76,14 @@ public:
|
||||
return mFilename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief List of registered statements
|
||||
*/
|
||||
inline const TStatementList& getStatementList(void) const
|
||||
{
|
||||
return mStatementList;
|
||||
}
|
||||
|
||||
private:
|
||||
// Database must not be copyable
|
||||
Database(void);
|
||||
@ -82,7 +93,7 @@ private:
|
||||
private:
|
||||
sqlite3* mpSQLite; //!< Pointer to SQLite Database Connection Handle
|
||||
std::string mFilename; //!< UTF-8 filename used to open the database
|
||||
std::vector<Statement*> mStatementList; //!< Liste of SQL statements used with this database connexion
|
||||
TStatementList mStatementList; //!< List of SQL registered statements used with this database connexion
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user