[tracker/rss-enclosures] SPARQL: Always generate SELECT around group graph pattern
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] SPARQL: Always generate SELECT around group graph pattern
- Date: Sat, 26 Jun 2010 23:15:35 +0000 (UTC)
commit 23be40944c0be7b4ca57bff0b7ad013b43c544b1
Author: Jürg Billeter <j bitron ch>
Date: Tue Jun 8 15:41:55 2010 +0200
SPARQL: Always generate SELECT around group graph pattern
Without extra SELECT, invalid SQL may be generated for certain FILTER
clauses.
src/libtracker-data/tracker-sparql-pattern.vala | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-sparql-pattern.vala b/src/libtracker-data/tracker-sparql-pattern.vala
index 008faf0..810b76d 100644
--- a/src/libtracker-data/tracker-sparql-pattern.vala
+++ b/src/libtracker-data/tracker-sparql-pattern.vala
@@ -944,7 +944,10 @@ class Tracker.Sparql.Pattern : Object {
if (!in_triples_block && !in_group_graph_pattern) {
in_group_graph_pattern = true;
+
+ sql.insert (group_graph_pattern_start, "SELECT * FROM (");
translate_group_or_union_graph_pattern (sql);
+ sql.append (")");
} else {
if (in_triples_block) {
end_triples_block (sql, ref first_where, in_group_graph_pattern);
@@ -965,7 +968,10 @@ class Tracker.Sparql.Pattern : Object {
} else if (current () == SparqlTokenType.OPEN_BRACE) {
if (!in_triples_block && !in_group_graph_pattern) {
in_group_graph_pattern = true;
+
+ sql.insert (group_graph_pattern_start, "SELECT * FROM (");
translate_group_or_union_graph_pattern (sql);
+ sql.append (")");
} else {
if (in_triples_block) {
end_triples_block (sql, ref first_where, in_group_graph_pattern);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]