Move the ON DUPLICATE KEY UPDATE and UPDATE...AS alias SQL rewrites out of Database::rewriteForSQLite() and into Tag::createNew() and Tag::recount() as driver-aware branches via a new Database::getDriver() method. This keeps dialect-specific SQL explicit at the call site rather than buried in fragile regex transforms. Also fix Tag::getAlbums() and Tag::getPeople() failing on SQLite when id_parent is NULL by adding an IS NULL fallback for root-level queries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
11 KiB
11 KiB