perf(webdav): single UNION ALL query for path resolution

Replace the double-query pattern (get_folder_by_path + get_file_by_path)
across PROPFIND, HEAD, DELETE, MOVE, and COPY handlers with a single
UNION ALL query via PathResolverService.

PG Append node short-circuits on LIMIT 1: if the folder branch matches,
the file branch is never executed. Cuts WebDAV path resolution from
2 round-trips to 1 per request.

Also adds an exists() method using EXISTS subqueries for the Overwrite
header checks in MOVE/COPY (avoids constructing full DTOs).

Legacy double-query fallback retained when PathResolver is unavailable.
This commit is contained in:
Dionisio
2026-03-02 23:40:48 +01:00
parent b199968a6e
commit b9bf7ba288
4 changed files with 648 additions and 212 deletions
+1
View File
@@ -7,6 +7,7 @@ pub mod image_transcode_service;
pub mod jwt_service;
pub mod oidc_service;
pub mod password_hasher;
pub mod path_resolver_service;
pub mod path_service;
pub mod thumbnail_service;
pub mod trash_cleanup_service;