[tracker] SPARQL: Fix SELECT * with WHERE without variables
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] SPARQL: Fix SELECT * with WHERE without variables
- Date: Wed, 24 Nov 2010 09:29:40 +0000 (UTC)
commit fbe2cad701077a16b0795069ea5bdfc86d98e3f1
Author: Jürg Billeter <j bitron ch>
Date: Wed Nov 24 09:54:16 2010 +0100
SPARQL: Fix SELECT * with WHERE without variables
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 94f6985..a81f57b 100644
--- a/src/libtracker-data/tracker-sparql-pattern.vala
+++ b/src/libtracker-data/tracker-sparql-pattern.vala
@@ -309,6 +309,8 @@ class Tracker.Sparql.Pattern : Object {
}
} else {
for (int i = 0; ; i++) {
+ first = false;
+
if (i > 0) {
sql.append (", ");
}
@@ -338,6 +340,10 @@ class Tracker.Sparql.Pattern : Object {
query.bindings.append (binding);
}
+ if (first) {
+ sql.append ("NULL");
+ }
+
// select from results of WHERE clause
sql.append (" FROM (");
sql.append (pattern_sql.str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]