From: Aki Tuomi Date: Thu, 30 Jul 2015 17:11:21 +0000 (+0300) Subject: Add search records/comments to gPgSQL backend X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~2^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d2fe84b2dc11ddbe382ed7c66917e3b44951576;p=thirdparty%2Fpdns.git Add search records/comments to gPgSQL backend --- diff --git a/modules/gpgsqlbackend/gpgsqlbackend.cc b/modules/gpgsqlbackend/gpgsqlbackend.cc index 212d7b9912..da79e0b6db 100644 --- a/modules/gpgsqlbackend/gpgsqlbackend.cc +++ b/modules/gpgsqlbackend/gpgsqlbackend.cc @@ -122,6 +122,9 @@ public: declare(suffix, "insert-comment-query", "", "INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES ($1, $2, $3, $4, $5, $6)"); declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=$1 AND name=$2 AND type=$3"); declare(suffix, "delete-comments-query", "", "DELETE FROM comments WHERE domain_id=$1"); + declare(suffix, "search-records-query", "", record_query+" name LIKE $1 OR content LIKE $2 LIMIT $3"); + declare(suffix, "search-comments-query", "", "SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE name LIKE $1 OR comment LIKE $2 LIMIT $3"); + } DNSBackend *make(const string &suffix="")