From 066e5b3fc08b6b85311e29aad6e78f12aba1a30e Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 4 Nov 2011 02:28:21 -0400 Subject: Delete all tables before flushing not just ones we know about --- modules/extra/m_sqlite.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/extra/m_sqlite.cpp') diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index 58eab1c32..2411f843f 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -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()); -- cgit