summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_sqlv2.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-24 18:45:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-24 18:45:17 +0000
commit475f5579b5674a1b14d051bbd5d4400dd811e085 (patch)
tree669f3eacaa1597ff4f41eff1d40ef9c694ef6e51 /src/modules/extra/m_sqlv2.h
parent56123af167d744f4553ea1caa3ca4a1ec5eef0a3 (diff)
Remove variadic macros from sqlv2 api, removing the warnings that come with it and increasing compatibility
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8353 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_sqlv2.h')
-rw-r--r--src/modules/extra/m_sqlv2.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/extra/m_sqlv2.h b/src/modules/extra/m_sqlv2.h
index c7f6edbb9..2279e9d54 100644
--- a/src/modules/extra/m_sqlv2.h
+++ b/src/modules/extra/m_sqlv2.h
@@ -19,12 +19,6 @@
#include <map>
#include "modules.h"
-/** SQLreq define.
- * This is the voodoo magic which lets us pass multiple
- * parameters to the SQLrequest constructor... voodoo...
- */
-#define SQLreq(a, b, c, d, e...) SQLrequest(a, b, c, (SQLquery(d), ##e))
-
/** Identifiers used to identify Request types
*/
#define SQLREQID "SQLv2 Request"
@@ -140,11 +134,11 @@ public:
* the workaround for this isn't easy to describe simply, but in a nutshell what's really
* happening when - from the above example - you do this:
*
- * SQLrequest foo = SQLreq(this, target, "databaseid", "SELECT (foo, bar) FROM rawr WHERE foo = '?' AND bar = ?", "Hello", "42");
+ * SQLrequest foo = SQLrequest(this, target, "databaseid", SQLquery("SELECT (foo, bar) FROM rawr WHERE foo = '?' AND bar = ?", "Hello", "42"));
*
* what's actually happening is functionally this:
*
- * SQLrequest foo = SQLreq(this, target, "databaseid", query("SELECT (foo, bar) FROM rawr WHERE foo = '?' AND bar = ?").addparam("Hello").addparam("42"));
+ * SQLrequest foo = SQLrequest(this, target, "databaseid", query("SELECT (foo, bar) FROM rawr WHERE foo = '?' AND bar = ?").addparam("Hello").addparam("42"));
*
* with 'query()' returning a reference to an object with a 'addparam()' member function which
* in turn returns a reference to that object. There are actually four ways you can create a
@@ -233,7 +227,7 @@ public:
/** Initialize an SQLrequest.
* For example:
*
- * SQLrequest req = SQLreq(MyMod, SQLModule, dbid, "INSERT INTO ircd_log_actors VALUES('','?')", nick);
+ * SQLrequest req = SQLrequest(MyMod, SQLModule, dbid, SQLquery("INSERT INTO ircd_log_actors VALUES('','?')" % nick));
*
* @param s A pointer to the sending module, where the result should be routed
* @param d A pointer to the receiving module, identified as implementing the 'SQL' feature