From a40ed6aa754029ea476880fe8fb826398ac12a57 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Wed, 5 Aug 2015 19:22:17 +0300 Subject: [PATCH] Add search records/comments to gPgSQL backend --- modules/gpgsqlbackend/gpgsqlbackend.cc | 3 +++ 1 file changed, 3 insertions(+) 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="") -- 2.40.0