summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-11-13 12:58:18 +0000
committerPeter Powell <petpow@saberuk.com>2019-11-13 12:58:18 +0000
commit43fb2f9972de22cafb93f2a8a67039176095f4c0 (patch)
tree010ddba2a333fdd8dea2aea544b0e49c1490b24c /include/modules
parent78a72b90b0213f774d3a65de093c9b61f2abe210 (diff)
Add GetId() to the SQL::Provider class.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/sql.h9
1 files changed, 8 insertions, 1 deletions
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.