cte: add brackets for clarity

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/579/head
Varun Patil 2023-04-13 23:20:23 -07:00
parent 71a5d5e701
commit cf8533968d
1 changed files with 4 additions and 2 deletions

View File

@ -29,9 +29,10 @@ trait TimelineQueryCTE
return return
"*PREFIX*cte_folders_all(fileid, name) AS ( "*PREFIX*cte_folders_all(fileid, name) AS (
{$BASE_QUERY} {$BASE_QUERY}
WHERE WHERE (
{$CLS_TOP_FOLDER} AND {$CLS_TOP_FOLDER} AND
{$CLS_NOMEDIA} {$CLS_NOMEDIA}
)
UNION ALL UNION ALL
@ -42,8 +43,9 @@ trait TimelineQueryCTE
{$CLS_MIME_FOLDER} AND {$CLS_MIME_FOLDER} AND
{$CLS_ARCHIVE_JOIN} {$CLS_ARCHIVE_JOIN}
) )
WHERE WHERE (
{$CLS_NOMEDIA} {$CLS_NOMEDIA}
)
)"; )";
} }