diff options
| author | 2022-06-02 08:41:08 +0200 | |
|---|---|---|
| committer | 2022-06-02 08:41:08 +0200 | |
| commit | f85c510ed49be031145f6b35e815ce890cd4f9aa (patch) | |
| tree | c7ac947ba5ddacf85dc5d97330f38f7d91b0964c /app/Models/EntryDAOPGSQL.php | |
| parent | f988b996ab69104bc45b222fa88d34b5c78f98b3 (diff) | |
New search engine (#4378)
* New possibility to invoke user queries from a search expression
From the search field: `S:"My query"`.
Can be combined with other filters such as `S:"My query" date:P3d` as long as the user queries do not contain `OR`.
A use-case is to have an RSS filter with a stable address or an external API call with the ability to update the user query.
* Draft of parenthesis logic
* More draft
* Working parenthesis (a OR b) (c OR d)
* Working (A) OR (B)
* Support nested parentheses + unit tests + documentation
* search:MySearch and S:3
Diffstat (limited to 'app/Models/EntryDAOPGSQL.php')
| -rw-r--r-- | app/Models/EntryDAOPGSQL.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/EntryDAOPGSQL.php b/app/Models/EntryDAOPGSQL.php index b97417a7c..13bf8b41f 100644 --- a/app/Models/EntryDAOPGSQL.php +++ b/app/Models/EntryDAOPGSQL.php @@ -2,19 +2,19 @@ class FreshRSS_EntryDAOPGSQL extends FreshRSS_EntryDAOSQLite { - public function hasNativeHex(): bool { + public static function hasNativeHex(): bool { return true; } - public function sqlHexDecode(string $x): string { + public static function sqlHexDecode(string $x): string { return 'decode(' . $x . ", 'hex')"; } - public function sqlHexEncode(string $x): string { + public static function sqlHexEncode(string $x): string { return 'encode(' . $x . ", 'hex')"; } - public function sqlIgnoreConflict(string $sql): string { + public static function sqlIgnoreConflict(string $sql): string { return rtrim($sql, ' ;') . ' ON CONFLICT DO NOTHING'; } |
