From: Aki Tuomi Date: Wed, 5 Aug 2015 16:22:17 +0000 (+0300) Subject: Add search records/comments to gPgSQL backend X-Git-Tag: auth-3.4.6~10^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a40ed6aa754029ea476880fe8fb826398ac12a57;p=pdns Add search records/comments to gPgSQL backend --- diff --git a/modules/gpgsqlbackend/gpgsqlbackend.cc b/modules/gpgsqlbackend/gpgsqlbackend.cc index d3c186608..1d1e3af14 100644 --- a/modules/gpgsqlbackend/gpgsqlbackend.cc +++ b/modules/gpgsqlbackend/gpgsqlbackend.cc @@ -118,6 +118,9 @@ public: declare(suffix, "insert-comment-query", "", "INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (%d, E'%s', E'%s', %d, E'%s', E'%s')"); declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=%d AND name=E'%s' AND type=E'%s'"); declare(suffix, "delete-comments-query", "", "DELETE FROM comments WHERE domain_id=%d"); + + declare(suffix, "search-records-query", "", record_query+" name LIKE '%s' OR content LIKE '%s' LIMIT %d"); + declare(suffix, "search-comments-query", "", "SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE name LIKE '%s' OR comment LIKE '%s' LIMIT %d"); } DNSBackend *make(const string &suffix="")