[tracker] libtracker-data: Make ASK use the same 'true' and 'false' as xsd:boolean
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Make ASK use the same 'true' and 'false' as xsd:boolean
- Date: Mon, 11 Apr 2011 12:14:48 +0000 (UTC)
commit ad57d8c62aa012e7cad2655e9ee55b7363ae9717
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]