diff options
Diffstat (limited to 'app/Models/EntryDAOSQLite.php')
| -rw-r--r-- | app/Models/EntryDAOSQLite.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index 1a87d03be..91894b8ac 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -3,27 +3,33 @@ declare(strict_types=1); class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { + #[\Override] public static function isCompressed(): bool { return false; } + #[\Override] public static function hasNativeHex(): bool { return false; } + #[\Override] protected static function sqlConcat(string $s1, string $s2): string { return $s1 . '||' . $s2; } + #[\Override] public static function sqlHexDecode(string $x): string { return $x; } + #[\Override] public static function sqlIgnoreConflict(string $sql): string { return str_replace('INSERT INTO ', 'INSERT OR IGNORE INTO ', $sql); } /** @param array<string|int> $errorInfo */ + #[\Override] protected function autoUpdateDb(array $errorInfo): bool { if ($tableInfo = $this->pdo->query("PRAGMA table_info('entry')")) { $columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1) ?: []; @@ -36,6 +42,7 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { return false; } + #[\Override] public function commitNewEntries(): bool { $sql = <<<'SQL' DROP TABLE IF EXISTS `tmp`; @@ -74,6 +81,7 @@ SQL; * @param bool $is_read * @return int|false affected rows */ + #[\Override] public function markRead($ids, bool $is_read = true) { FreshRSS_UserDAO::touch(); if (is_array($ids)) { //Many IDs at once (used by API) @@ -119,6 +127,7 @@ SQL; * @param string $idMax max article ID * @return int|false affected rows */ + #[\Override] public function markReadTag($id = 0, string $idMax = '0', ?FreshRSS_BooleanSearch $filters = null, int $state = 0, bool $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == 0) { |
