1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 06:36:38 +02:00

Delete all tables before flushing not just ones we know about

This commit is contained in:
Adam
2011-11-04 02:28:21 -04:00
parent 09dba47653
commit 066e5b3fc0
4 changed files with 40 additions and 7 deletions
+7
View File
@@ -46,6 +46,8 @@ class SQLiteService : public SQLProvider
SQLQuery CreateTable(const Anope::string &table, const SerializableBase::serialized_data &data);
SQLQuery GetTables();
Anope::string BuildQuery(const SQLQuery &q);
};
@@ -213,6 +215,11 @@ SQLQuery SQLiteService::CreateTable(const Anope::string &table, const Serializab
return SQLQuery(query_text);
}
SQLQuery SQLiteService::GetTables()
{
return SQLQuery("SELECT name FROM sqlite_master WHERE type='table'");
}
Anope::string SQLiteService::Escape(const Anope::string &query)
{
char *e = sqlite3_mprintf("%q", query.c_str());