X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fmodules%2Fsql.h;h=47da6f6bff2a3c40cad577678613ce47c8d4b9b9;hb=635cb9d65f6d7f6758ae8ed874da00c8d94b6e39;hp=15e8260b6ec57e3e75326e3c19fc23f669a9572d;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/modules/sql.h b/include/modules/sql.h index 15e8260b6..47da6f6bf 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -1,7 +1,10 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017 Peter Powell + * Copyright (C) 2015 Daniel Vassdal + * Copyright (C) 2014 Attila Molnar + * Copyright (C) 2013, 2017-2019 Sadie Powell + * Copyright (C) 2012 Robby * Copyright (C) 2010 Daniel De Graaf * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -104,7 +107,7 @@ class SQL::Result : public classbase /** * Return the number of rows in the result. * - * Note that if you have perfomed an INSERT or UPDATE query or other + * Note that if you have performed an INSERT or UPDATE query or other * query which will not return rows, this will return the number of * affected rows. In this case you SHOULD NEVER access any of the result * set rows, as there aren't any! @@ -228,12 +231,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.