From d65b98499c41e4dd50e502a4165c116fb3725603 Mon Sep 17 00:00:00 2001 From: cage Date: Sat, 15 Jun 2024 17:24:39 +0200 Subject: [PATCH] - ensured the colmuns are correctly quoted when performing local search. --- src/db.lisp | 3 ++- src/fediverse-post-local-search.lisp | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/db.lisp b/src/db.lisp index 74d9ff8..dd55099 100644 --- a/src/db.lisp +++ b/src/db.lisp @@ -1719,7 +1719,8 @@ that identify a single message in table :status" account-id &rest where-clauses) - "Query the table status + "Query the table status joined with table `account` for some extra +information (see the function `gen-message-select'). - other-column fetch other column from table :status or :account (the default columns are all the ones of table status and the columns diff --git a/src/fediverse-post-local-search.lisp b/src/fediverse-post-local-search.lisp index ab48830..c9a4830 100644 --- a/src/fediverse-post-local-search.lisp +++ b/src/fediverse-post-local-search.lisp @@ -29,19 +29,19 @@ (:constant nil)) (defrule fedisearch-column (or - "\"status-id\"" - "\"account-id\"" + "status-id" + "account-id" "username" "account" "uri" "content" - "\"rendered-text\"" + "rendered-text" "visibility" "sensitive" "spoiler-text" "reblogs-count" - "\"favourites-count\"" - "\"replies-count\"" + "favourites-count" + "replies-count" "url" "language" "favourited" @@ -52,7 +52,7 @@ "redp" "timeline" "folder") - (:text t)) + (:function (lambda (a) (db::quote-symbol a)))) (defrule fedisearch-column-value (and #\" (+ (not #\")) #\") (:text t))