summaryrefslogtreecommitdiff
path: root/modules/extra/mysql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/mysql.cpp')
-rw-r--r--modules/extra/mysql.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/extra/mysql.cpp b/modules/extra/mysql.cpp
index b5ff0c3d9..389124073 100644
--- a/modules/extra/mysql.cpp
+++ b/modules/extra/mysql.cpp
@@ -159,6 +159,7 @@ class MySQLService : public Provider
std::vector<Query> CreateTable(const Anope::string &prefix, Serialize::TypeBase *) override;
std::vector<Query> AlterTable(const Anope::string &, Serialize::TypeBase *, Serialize::FieldBase *) override;
std::vector<Query> CreateIndex(const Anope::string &table, const Anope::string &field) override;
+ Query SelectFind(const Anope::string &table, const Anope::string &field) override;
Query BeginTransaction() override;
Query Commit() override;
@@ -490,6 +491,11 @@ std::vector<Query> MySQLService::CreateIndex(const Anope::string &table, const A
return queries;
}
+Query MySQLService::SelectFind(const Anope::string &table, const Anope::string &field)
+{
+ return Query("SELECT `id` FROM `" + table + "` WHERE `" + field + "` = @value@");
+}
+
Query MySQLService::BeginTransaction()
{
return Query("START TRANSACTION WITH CONSISTENT SNAPSHOT");