From 5b5e878a69339329b6c3bb6c94b18e780b2d6df3 Mon Sep 17 00:00:00 2001 From: Travis Abendshien <46939827+CyanVoxel@users.noreply.github.com> Date: Thu, 20 Mar 2025 01:09:46 -0700 Subject: [PATCH] fix: use UNION instead of UNION ALL (#877) --- src/tagstudio/core/library/alchemy/library.py | 2 +- src/tagstudio/core/library/alchemy/visitors.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tagstudio/core/library/alchemy/library.py b/src/tagstudio/core/library/alchemy/library.py index bb932685..81e259d4 100644 --- a/src/tagstudio/core/library/alchemy/library.py +++ b/src/tagstudio/core/library/alchemy/library.py @@ -96,7 +96,7 @@ TAG_CHILDREN_QUERY = text(""" -- Note for this entire query that tag_parents.child_id is the parent id and tag_parents.parent_id is the child id due to bad naming WITH RECURSIVE ChildTags AS ( SELECT :tag_id AS child_id - UNION ALL + UNION SELECT tp.parent_id AS child_id FROM tag_parents tp INNER JOIN ChildTags c ON tp.child_id = c.child_id diff --git a/src/tagstudio/core/library/alchemy/visitors.py b/src/tagstudio/core/library/alchemy/visitors.py index e242d2f6..31a10d76 100644 --- a/src/tagstudio/core/library/alchemy/visitors.py +++ b/src/tagstudio/core/library/alchemy/visitors.py @@ -36,7 +36,7 @@ TAG_CHILDREN_ID_QUERY = text(""" -- Note for this entire query that tag_parents.child_id is the parent id and tag_parents.parent_id is the child id due to bad naming WITH RECURSIVE ChildTags AS ( SELECT :tag_id AS child_id - UNION ALL + UNION SELECT tp.parent_id AS child_id FROM tag_parents tp INNER JOIN ChildTags c ON tp.child_id = c.child_id