[gnome-photos/wip/uajain/de_dup: 35/37] Add photos_query_builder_get_remote_objects_with_related_to



commit 598dc7b6d8b6853a247e3ff147e3043af1635c9c
Author: Umang Jain <mailumangjain gmail com>
Date:   Sat Aug 20 22:06:15 2016 +0530

    Add photos_query_builder_get_remote_objects_with_related_to

 src/photos-query-builder.c |   10 ++++++++++
 src/photos-query-builder.h |    3 +++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-query-builder.c b/src/photos-query-builder.c
index 80f82e2..d101f0c 100644
--- a/src/photos-query-builder.c
+++ b/src/photos-query-builder.c
@@ -329,6 +329,16 @@ photos_query_builder_single_query (PhotosSearchContextState *state, gint flags,
 
 
 PhotosQuery *
+photos_query_builder_get_remote_objects_with_related_to (PhotosSearchContextState *state)
+{
+  gchar *sparql;
+
+  sparql = g_strdup_printf ("SELECT ?urn WHERE {?urn a nie:DataObject FILTER BOUND (nie:relatedTo(?urn))}");
+  return photos_query_new (state, sparql);
+}
+
+
+PhotosQuery *
 photos_query_builder_update_mtime_query (PhotosSearchContextState *state, const gchar *resource)
 {
   GTimeVal tv;
diff --git a/src/photos-query-builder.h b/src/photos-query-builder.h
index c03c368..fd1eee5 100644
--- a/src/photos-query-builder.h
+++ b/src/photos-query-builder.h
@@ -66,6 +66,9 @@ PhotosQuery  *photos_query_builder_insert_remote_object (PhotosSearchContextStat
 
 PhotosQuery  *photos_query_builder_relate_remote_object (PhotosSearchContextState *state, const gchar 
*remote_urn, const gchar *item_urn);
 
+
+PhotosQuery  *photos_query_builder_get_remote_objects_with_related_to (PhotosSearchContextState *state);
+
 G_END_DECLS
 
 #endif /* PHOTOS_QUERY_BUILDER */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]