From: Aki Tuomi Date: Thu, 30 Jul 2015 17:00:40 +0000 (+0300) Subject: Add search records/comments to gSQLite3 X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~2^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=075d77ab9803bf588e073873dde1a6699802a120;p=pdns Add search records/comments to gSQLite3 --- diff --git a/modules/gsqlite3backend/gsqlite3backend.cc b/modules/gsqlite3backend/gsqlite3backend.cc index a6b892f0a..c6981affa 100644 --- a/modules/gsqlite3backend/gsqlite3backend.cc +++ b/modules/gsqlite3backend/gsqlite3backend.cc @@ -138,6 +138,8 @@ public: declare(suffix, "insert-comment-query", "", "INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (:domain_id, :qname, :qtype, :modified_at, :account, :content)"); declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=:domain_id AND name=:qname AND type=:qtype"); declare(suffix, "delete-comments-query", "", "DELETE FROM comments WHERE domain_id=:domain_id"); + declare(suffix, "search-records-query", "", record_query+" name LIKE :value OR content LIKE :value2 LIMIT :limit"); + declare(suffix, "search-comments-query", "", "SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE name LIKE :value OR comment LIKE :value2 LIMIT :limit"); } //! Constructs a new gSQLite3Backend object.