[tracker/wip/extract-graphs: 1/3] libtracker-sparql: Allow append() on embedded inserts in TrackerSparqlBuilder



commit e4b60d4e67e896b8fc79d428433d733829e99094
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 25 11:24:40 2011 +0200

    libtracker-sparql: Allow append() on embedded inserts in TrackerSparqlBuilder
    
    The result() method was returning nothing for these if only append() is used
    to introduce content in a TrackerSparqlBuilder created through the embedded_insert()
    constructor.

 src/libtracker-sparql/tracker-builder.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-builder.vala b/src/libtracker-sparql/tracker-builder.vala
index a0607fb..dba38f5 100644
--- a/src/libtracker-sparql/tracker-builder.vala
+++ b/src/libtracker-sparql/tracker-builder.vala
@@ -105,7 +105,9 @@ public class Tracker.Sparql.Builder : Object {
 	 */
 	public string result {
 		get {
-			warn_if_fail (states.length == 1);
+			warn_if_fail (states.length == 1 ||
+			              (states[0] == State.EMBEDDED_INSERT &&
+			               states.length == 3));
 			return str.str;
 		}
 	}



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