[tracker/tracker-0.10] libtracker-data: Make ASK use the same 'true' and 'false' as xsd:boolean
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] libtracker-data: Make ASK use the same 'true' and 'false' as xsd:boolean
- Date: Thu, 14 Apr 2011 15:16:01 +0000 (UTC)
commit 05e98e09d943c244f53cf0e7f0b4f5a8165ff83d
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Apr 11 13:44:30 2011 +0200
libtracker-data: Make ASK use the same 'true' and 'false' as xsd:boolean
Fixes NB#245589.
src/libtracker-data/tracker-sparql-query.vala | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-query.vala b/src/libtracker-data/tracker-sparql-query.vala
index 27dae58..397779e 100644
--- a/src/libtracker-data/tracker-sparql-query.vala
+++ b/src/libtracker-data/tracker-sparql-query.vala
@@ -540,20 +540,17 @@ public class Tracker.Sparql.Query : Object {
// build SQL
var sql = new StringBuilder ();
- sql.append ("SELECT ");
+ sql.append ("SELECT CASE EXISTS ( ");
expect (SparqlTokenType.ASK);
- sql.append ("COUNT(1) > 0");
-
accept (SparqlTokenType.WHERE);
context = pattern.translate_group_graph_pattern (pattern_sql);
// select from results of WHERE clause
- sql.append (" FROM (");
sql.append (pattern_sql.str);
- sql.append (")");
+ sql.append (" ) WHEN 1 THEN 'true' WHEN 0 THEN 'false' ELSE NULL END");
context = context.parent_context;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]