[gnome-photos/wip/rishi/tracker3: 2/4] Remove unnecessary {{item_where}} snippets
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/tracker3: 2/4] Remove unnecessary {{item_where}} snippets
- Date: Thu, 11 Mar 2021 20:49:23 +0000 (UTC)
commit af8a4a8682ee32c9b7e02412a545896b54077e09
Author: Sam Thursfield <sam afuera me uk>
Date: Thu Mar 11 20:38:57 2021 +0100
Remove unnecessary {{item_where}} snippets
The {{item_where}} snippet is used to show the contents of a collection
in the COLLECTION_VIEW mode. This mode uses the "all" SPARQL template,
and therefore the {{item_where}} is unnecessary in all the other
templates.
A subsequent commit will port to Tracker 3, where the SPARQL templates
would have to aggregate metadata from different Tracker endpoints.
Since an item and its collection might belong to different endpoints,
not having the unused {{item_where}} snippets can greatly simplify the
SPARQL.
https://gitlab.gnome.org/GNOME/gnome-photos/-/issues/152
src/photos-query-collections.sparql.template | 1 -
src/photos-query-favorites.sparql.template | 1 -
src/photos-query-photos.sparql.template | 1 -
3 files changed, 3 deletions(-)
---
diff --git a/src/photos-query-collections.sparql.template b/src/photos-query-collections.sparql.template
index 26a5a2f8..59155cc2 100644
--- a/src/photos-query-collections.sparql.template
+++ b/src/photos-query-collections.sparql.template
@@ -22,7 +22,6 @@ SELECT {{projection}}
{
?urn a nfo:DataContainer.
?item a nmm:Photo; nie:isPartOf ?urn.
- {{item_where}}
}
GROUP BY (?urn)
}
diff --git a/src/photos-query-favorites.sparql.template b/src/photos-query-favorites.sparql.template
index 430e5690..23780d4e 100644
--- a/src/photos-query-favorites.sparql.template
+++ b/src/photos-query-favorites.sparql.template
@@ -20,7 +20,6 @@ SELECT {{projection}}
?urn a nmm:Photo; nao:hasTag nao:predefined-tag-favorite .
OPTIONAL { ?urn nco:creator ?creator . }
OPTIONAL { ?urn nco:publisher ?publisher . }
- {{item_where}}
FILTER ({{blocked_mime_types_filter}} && {{search_match_filter}} && {{source_filter}})
}
{{order}}
diff --git a/src/photos-query-photos.sparql.template b/src/photos-query-photos.sparql.template
index aad7cb92..0973bbfb 100644
--- a/src/photos-query-photos.sparql.template
+++ b/src/photos-query-photos.sparql.template
@@ -20,7 +20,6 @@ SELECT {{projection}}
?urn a nmm:Photo .
OPTIONAL { ?urn nco:creator ?creator . }
OPTIONAL { ?urn nco:publisher ?publisher . }
- {{item_where}}
FILTER ({{blocked_mime_types_filter}} && {{search_match_filter}} && {{source_filter}})
}
{{order}}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]