From: Aki Tuomi Date: Thu, 30 Jul 2015 17:13:10 +0000 (+0300) Subject: Add search records/comments to gOracle backend X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~2^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0b4a0b316d5c9bef7b8708d94d226c60e107f97;p=pdns Add search records/comments to gOracle backend --- diff --git a/modules/goraclebackend/goraclebackend.cc b/modules/goraclebackend/goraclebackend.cc index b45a5ced8..6ae4c8785 100644 --- a/modules/goraclebackend/goraclebackend.cc +++ b/modules/goraclebackend/goraclebackend.cc @@ -140,6 +140,8 @@ public: declare(suffix, "insert-comment-query", "", "INSERT INTO comments (id, domain_id, name, type, modified_at, account, \"comment\") VALUES (comments_id_sequence.nextval, :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"); }