From 43fb2f9972de22cafb93f2a8a67039176095f4c0 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 13 Nov 2019 12:58:18 +0000 Subject: Add GetId() to the SQL::Provider class. --- include/modules/sql.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/modules/sql.h') diff --git a/include/modules/sql.h b/include/modules/sql.h index 15e8260b6..78cfe89cd 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -228,12 +228,19 @@ class SQL::Query : public classbase */ class SQL::Provider : public DataProvider { + private: + /** The name of the database tag in the config. */ + const std::string dbid; + public: Provider(Module* Creator, const std::string& Name) - : DataProvider(Creator, Name) + : DataProvider(Creator, "SQL/" + Name) { } + /** Retrieves the name of the database tag in the config. */ + const std::string& GetId() const { return dbid; } + /** Submit an asynchronous SQL query. * @param callback The result reporting point * @param query The hardcoded query string. If you have parameters to substitute, see below. -- cgit v1.3.1-10-gc9f91