]> granicus.if.org Git - pdns/commitdiff
Add search records/comments to gMySQL backend
authorAki Tuomi <cmouse@desteem.org>
Thu, 30 Jul 2015 17:12:09 +0000 (20:12 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Tue, 4 Aug 2015 12:26:16 +0000 (15:26 +0300)
modules/gmysqlbackend/gmysqlbackend.cc

index a8f6ddaf517096d00089454aa1fced52ac785d02..df7a32f96939500325083812149e041b0d68e939 100644 (file)
@@ -127,6 +127,8 @@ public:
     declare(suffix, "insert-comment-query", "", "INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (?, ?, ?, ?, ?, ?)");
     declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=? AND name=? AND type=?");
     declare(suffix, "delete-comments-query", "", "DELETE FROM comments WHERE domain_id=?");
+    declare(suffix, "search-records-query", "", record_query+" name LIKE ? OR content LIKE ? LIMIT ?");
+    declare(suffix, "search-comments-query", "", "SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE name LIKE ? OR comment LIKE ? LIMIT ?");
   }
 
   DNSBackend *make(const string &suffix="")