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/EntryDAOSQLite.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/EntryDAOSQLite.php')
| -rw-r--r-- | app/Models/EntryDAOSQLite.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index 16d15f899..e4e079959 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -2,19 +2,23 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { - public function isCompressed(): bool { + public static function isCompressed(): bool { return false; } - public function hasNativeHex(): bool { + public static function hasNativeHex(): bool { return false; } - public function sqlHexDecode(string $x): string { + protected static function sqlConcat($s1, $s2) { + return $s1 . '||' . $s2; + } + + public static function sqlHexDecode(string $x): string { return $x; } - public function sqlIgnoreConflict(string $sql): string { + public static function sqlIgnoreConflict(string $sql): string { return str_replace('INSERT INTO ', 'INSERT OR IGNORE INTO ', $sql); } @@ -65,10 +69,6 @@ DROP TABLE IF EXISTS `tmp`; return $result; } - protected function sqlConcat($s1, $s2) { - return $s1 . '||' . $s2; - } - protected function updateCacheUnreads($catId = false, $feedId = false) { $sql = 'UPDATE `_feed` ' . 'SET `cache_nbUnreads`=(' |
