From: Aki Tuomi Date: Wed, 5 Aug 2015 16:22:07 +0000 (+0300) Subject: Add search records/comments to gSQLite3 X-Git-Tag: auth-3.4.6~10^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ccee6f76e200f6149f03df0460fa415de3117b1;p=pdns Add search records/comments to gSQLite3 --- diff --git a/modules/gsqlite3backend/gsqlite3backend.cc b/modules/gsqlite3backend/gsqlite3backend.cc index b99888cda..670031e5f 100644 --- a/modules/gsqlite3backend/gsqlite3backend.cc +++ b/modules/gsqlite3backend/gsqlite3backend.cc @@ -134,6 +134,9 @@ public: declare(suffix, "insert-comment-query", "", "INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (%d, '%s', '%s', %d, '%s', '%s')"); declare(suffix, "delete-comment-rrset-query", "", "DELETE FROM comments WHERE domain_id=%d AND name='%s' AND type='%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"); } //! Constructs a new gSQLite3Backend object.