[gnome-photos] query-builder: Add photos_query_builder_collection_icon_query
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] query-builder: Add photos_query_builder_collection_icon_query
- Date: Tue, 2 Apr 2013 22:39:04 +0000 (UTC)
commit 86389f5c8661ee18a3254e415dc2cf0a093e1bed
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Apr 2 21:19:43 2013 +0200
query-builder: Add photos_query_builder_collection_icon_query
src/photos-query-builder.c | 14 ++++++++++++++
src/photos-query-builder.h | 2 ++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 68053a4..df55232 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -201,6 +201,20 @@ photos_query_builder_create_collection_query (const gchar *name)
PhotosQuery *
+photos_query_builder_collection_icon_query (const gchar *resource)
+{
+ gchar *sparql;
+
+ sparql = g_strdup_printf ("SELECT ?urn "
+ "tracker:coalesce(nfo:fileLastModified(?urn), nie:contentLastModified(?urn)) AS
?mtime "
+ "WHERE { ?urn nie:isPartOf <%s> } "
+ "ORDER BY DESC (?mtime) LIMIT 4",
+ resource);
+ return photos_query_new (sparql);
+}
+
+
+PhotosQuery *
photos_query_builder_count_favorites_query (void)
{
gchar *filter;
diff --git a/src/photos-query-builder.h b/src/photos-query-builder.h
index 3d729ef..889effd 100644
--- a/src/photos-query-builder.h
+++ b/src/photos-query-builder.h
@@ -33,6 +33,8 @@ G_BEGIN_DECLS
PhotosQuery *photos_query_builder_create_collection_query (const gchar *name);
+PhotosQuery *photos_query_builder_collection_icon_query (const gchar *resource);
+
PhotosQuery *photos_query_builder_count_favorites_query (void);
PhotosQuery *photos_query_builder_count_query (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]