[solang] Use property functions when querying for URLs and MIME types



commit 6c6f188ef595e83e556a8374a2cc652a52611bc3
Author: Debarshi Ray <rishi gnu org>
Date:   Mon Feb 22 11:00:13 2010 +0200

    Use property functions when querying for URLs and MIME types
    
    Tracker uses anonymous file nodes since 0.7.19 and we need to
    explicitly ask for the URL using the nie:url property.

 src/common/database.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/common/database.cpp b/src/common/database.cpp
index 55fcb14..a9d5363 100644
--- a/src/common/database.cpp
+++ b/src/common/database.cpp
@@ -163,10 +163,9 @@ Database::search_async(const IPhotoSearchCriteriaList & criteria,
 
     const Glib::ustring query
         = Glib::ustring::compose(
-              "SELECT ?photo ?mime "
+              "SELECT nie:url(?photo) nie:mimeType(?photo) "
               "WHERE {"
-              "  ?photo a nmm:Photo ;"
-              "  nie:mimeType ?mime ."
+              "  ?photo a nmm:Photo ."
               "  %1"
               "}",
               clauses);



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