Location | Tool | Test ID | Function | Issue |
---|---|---|---|---|
tracker-sparql-query.c:396:0 | cppcheck | syntaxError | syntax error | |
tracker-sparql-query.c:1521:2 | gcc | _tracker_sparql_variable_hash_ghash_func | passing argument 1 of 'tracker_sparql_variable_hash' discards 'const' qualifier from pointer target type [enabled by default] | |
tracker-sparql-query.c:1530:2 | gcc | _tracker_sparql_variable_equal_gequal_func | passing argument 1 of 'tracker_sparql_variable_equal' discards 'const' qualifier from pointer target type [enabled by default] | |
tracker-sparql-query.c:1796:23 | gcc | unused-but-set-variable | tracker_sparql_context_get_variable | variable '_tmp5_' set but not used |
tracker-sparql-query.c:1811:3 | clang-analyzer | Value stored to '_tmp5_' is never read | ||
tracker-sparql-query.c:2574:7 | gcc | unused-but-set-variable | tracker_sparql_query_construct | variable '_tmp7__length1' set but not used |
tracker-sparql-query.c:2622:2 | clang-analyzer | Value stored to '_tmp7__length1' is never read | ||
tracker-sparql-query.c:2858:7 | gcc | unused-but-set-variable | tracker_sparql_query_get_uuid_for_name | variable '_tmp1__length1' set but not used |
tracker-sparql-query.c:2884:2 | clang-analyzer | Value stored to '_tmp1__length1' is never read | ||
tracker-sparql-query.c:3038:10 | gcc | unused-but-set-variable | tracker_sparql_query_generate_bnodeid | variable '_tmp17__length1' set but not used |
tracker-sparql-query.c:3060:5 | clang-analyzer | Value stored to '_new_base_uuid_size_' is never read | ||
tracker-sparql-query.c:3064:5 | clang-analyzer | Value stored to '_tmp17__length1' is never read | ||
tracker-sparql-query.c:3132:25 | clang-analyzer | Value stored to 'begin' during its initialization is never read | ||
tracker-sparql-query.c:3133:25 | clang-analyzer | Value stored to 'end' during its initialization is never read | ||
tracker-sparql-query.c:3148:8 | gcc | unused-but-set-variable | tracker_sparql_query_next | variable '_tmp13__length1' set but not used |
tracker-sparql-query.c:3183:3 | clang-analyzer | Value stored to '_tmp7__length1' is never read | ||
tracker-sparql-query.c:3193:3 | clang-analyzer | Value stored to '_tmp10__length1' is never read | ||
tracker-sparql-query.c:3203:3 | clang-analyzer | Value stored to '_tmp13__length1' is never read | ||
tracker-sparql-query.c:3217:2 | clang-analyzer | Value stored to '_tmp16__length1' is never read | ||
tracker-sparql-query.c:3235:7 | gcc | unused-but-set-variable | tracker_sparql_query_current | variable '_tmp0__length1' set but not used |
tracker-sparql-query.c:3244:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-sparql-query.c:3264:7 | gcc | unused-but-set-variable | tracker_sparql_query_last | variable '_tmp1__length1' set but not used |
tracker-sparql-query.c:3276:2 | clang-analyzer | Value stored to '_tmp1__length1' is never read | ||
tracker-sparql-query.c:3346:7 | gcc | unused-but-set-variable | tracker_sparql_query_get_error | variable '_tmp5__length1' set but not used |
tracker-sparql-query.c:3363:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-sparql-query.c:3375:2 | clang-analyzer | Value stored to '_tmp5__length1' is never read | ||
tracker-sparql-query.c:3413:7 | gcc | unused-but-set-variable | tracker_sparql_query_get_internal_error | variable '_tmp5__length1' set but not used |
tracker-sparql-query.c:3430:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-sparql-query.c:3442:2 | clang-analyzer | Value stored to '_tmp5__length1' is never read | ||
tracker-sparql-query.c:3555:7 | gcc | unused-but-set-variable | tracker_sparql_query_get_location | variable '_tmp0__length1' set but not used |
tracker-sparql-query.c:3564:2 | clang-analyzer | Value stored to '_tmp0__length1' is never read | ||
tracker-sparql-query.c:3661:7 | gcc | unused-but-set-variable | tracker_sparql_query_get_last_string | variable '_tmp10__length1' set but not used |
tracker-sparql-query.c:3676:2 | clang-analyzer | Value stored to '_tmp1__length1' is never read | ||
tracker-sparql-query.c:3688:2 | clang-analyzer | Value stored to '_tmp6__length1' is never read | ||
tracker-sparql-query.c:3698:2 | clang-analyzer | Value stored to '_tmp10__length1' is never read | ||
tracker-sparql-query.c:4006:3 | clang-analyzer | Value stored to 'ns_collection_length1' is never read | ||
tracker-sparql-query.c:4394:3 | clang-analyzer | Value stored to 'ns_collection_length1' is never read | ||
tracker-sparql-query.c:5368:11 | clang-analyzer | Access to field 'types' results in a dereference of a null pointer (loaded from variable '_tmp3_') | ||
tracker-sparql-query.c:5853:7 | gcc | unused-but-set-variable | tracker_sparql_query_execute_ask_cursor | variable '_tmp4__length1' set but not used |
tracker-sparql-query.c:5896:2 | clang-analyzer | Value stored to '_tmp4__length1' is never read | ||
tracker-sparql-query.c:7034:10 | gcc | unused-but-set-variable | tracker_sparql_query_execute_insert_or_delete | variable '_tmp115__length1' set but not used |
tracker-sparql-query.c:7074:5 | clang-analyzer | Value stored to '_tmp115__length1' is never read | ||
tracker-sparql-query.c:7534:3 | clang-analyzer | Value stored to 'is_null' is never read | ||
tracker-sparql-query.c:9829:2 | clang-analyzer | Value stored to 'is_null' is never read |
1 /* tracker-sparql-query.c generated by valac 0.18.1, the Vala compiler
2 * generated from tracker-sparql-query.vala, do not modify */
3
4 /*
5 * Copyright (C) 2008-2010, Nokia
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23 #include <glib.h>
24 #include <glib-object.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include "libtracker-data/tracker-property.h"
28 #include "libtracker-data/tracker-class.h"
29 #include "libtracker-data/tracker-data-query.h"
30 #include "libtracker-data/tracker-data-update.h"
31 #include "libtracker-data/tracker-data-backup.h"
32 #include "libtracker-sparql/tracker-sparql.h"
33 #include "libtracker-data/tracker-db-interface.h"
34 #include "libtracker-common/tracker-date-time.h"
35 #include "libtracker-data/tracker-ontologies.h"
36 #include "libtracker-data/tracker-namespace.h"
37 #include "libtracker-data/tracker-db-manager.h"
38 #include <float.h>
39 #include <math.h>
40 #include <gobject/gvaluecollector.h>
41
42
43 #define TRACKER_SPARQL_TYPE_VARIABLE_STATE (tracker_sparql_variable_state_get_type ())
44
45 #define TRACKER_SPARQL_TYPE_DATA_TABLE (tracker_sparql_data_table_get_type ())
46 #define TRACKER_SPARQL_DATA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTable))
47 #define TRACKER_SPARQL_DATA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTableClass))
48 #define TRACKER_SPARQL_IS_DATA_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE))
49 #define TRACKER_SPARQL_IS_DATA_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_DATA_TABLE))
50 #define TRACKER_SPARQL_DATA_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTableClass))
51
52 typedef struct _TrackerSparqlDataTable TrackerSparqlDataTable;
53 typedef struct _TrackerSparqlDataTableClass TrackerSparqlDataTableClass;
54 typedef struct _TrackerSparqlDataTablePrivate TrackerSparqlDataTablePrivate;
55
56 #define TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE (tracker_sparql_predicate_variable_get_type ())
57 #define TRACKER_SPARQL_PREDICATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariable))
58 #define TRACKER_SPARQL_PREDICATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariableClass))
59 #define TRACKER_SPARQL_IS_PREDICATE_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE))
60 #define TRACKER_SPARQL_IS_PREDICATE_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE))
61 #define TRACKER_SPARQL_PREDICATE_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_PREDICATE_VARIABLE, TrackerSparqlPredicateVariableClass))
62
63 typedef struct _TrackerSparqlPredicateVariable TrackerSparqlPredicateVariable;
64 typedef struct _TrackerSparqlPredicateVariableClass TrackerSparqlPredicateVariableClass;
65 #define _g_free0(var) (var = (g_free (var), NULL))
66 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
67
68 #define TRACKER_SPARQL_TYPE_DATA_BINDING (tracker_sparql_data_binding_get_type ())
69 #define TRACKER_SPARQL_DATA_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding))
70 #define TRACKER_SPARQL_DATA_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingClass))
71 #define TRACKER_SPARQL_IS_DATA_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING))
72 #define TRACKER_SPARQL_IS_DATA_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_DATA_BINDING))
73 #define TRACKER_SPARQL_DATA_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingClass))
74
75 typedef struct _TrackerSparqlDataBinding TrackerSparqlDataBinding;
76 typedef struct _TrackerSparqlDataBindingClass TrackerSparqlDataBindingClass;
77 typedef struct _TrackerSparqlDataBindingPrivate TrackerSparqlDataBindingPrivate;
78
79 #define TRACKER_SPARQL_TYPE_LITERAL_BINDING (tracker_sparql_literal_binding_get_type ())
80 #define TRACKER_SPARQL_LITERAL_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBinding))
81 #define TRACKER_SPARQL_LITERAL_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBindingClass))
82 #define TRACKER_SPARQL_IS_LITERAL_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING))
83 #define TRACKER_SPARQL_IS_LITERAL_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_LITERAL_BINDING))
84 #define TRACKER_SPARQL_LITERAL_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBindingClass))
85
86 typedef struct _TrackerSparqlLiteralBinding TrackerSparqlLiteralBinding;
87 typedef struct _TrackerSparqlLiteralBindingClass TrackerSparqlLiteralBindingClass;
88 typedef struct _TrackerSparqlLiteralBindingPrivate TrackerSparqlLiteralBindingPrivate;
89
90 #define TRACKER_SPARQL_TYPE_VARIABLE_BINDING (tracker_sparql_variable_binding_get_type ())
91 #define TRACKER_SPARQL_VARIABLE_BINDING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBinding))
92 #define TRACKER_SPARQL_VARIABLE_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBindingClass))
93 #define TRACKER_SPARQL_IS_VARIABLE_BINDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING))
94 #define TRACKER_SPARQL_IS_VARIABLE_BINDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING))
95 #define TRACKER_SPARQL_VARIABLE_BINDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBindingClass))
96
97 typedef struct _TrackerSparqlVariableBinding TrackerSparqlVariableBinding;
98 typedef struct _TrackerSparqlVariableBindingClass TrackerSparqlVariableBindingClass;
99 typedef struct _TrackerSparqlVariableBindingPrivate TrackerSparqlVariableBindingPrivate;
100
101 #define TRACKER_SPARQL_TYPE_VARIABLE (tracker_sparql_variable_get_type ())
102 #define TRACKER_SPARQL_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable))
103 #define TRACKER_SPARQL_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariableClass))
104 #define TRACKER_SPARQL_IS_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE))
105 #define TRACKER_SPARQL_IS_VARIABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE))
106 #define TRACKER_SPARQL_VARIABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariableClass))
107
108 typedef struct _TrackerSparqlVariable TrackerSparqlVariable;
109 typedef struct _TrackerSparqlVariableClass TrackerSparqlVariableClass;
110
111 #define TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST (tracker_sparql_variable_binding_list_get_type ())
112 #define TRACKER_SPARQL_VARIABLE_BINDING_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingList))
113 #define TRACKER_SPARQL_VARIABLE_BINDING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingListClass))
114 #define TRACKER_SPARQL_IS_VARIABLE_BINDING_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST))
115 #define TRACKER_SPARQL_IS_VARIABLE_BINDING_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST))
116 #define TRACKER_SPARQL_VARIABLE_BINDING_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingListClass))
117
118 typedef struct _TrackerSparqlVariableBindingList TrackerSparqlVariableBindingList;
119 typedef struct _TrackerSparqlVariableBindingListClass TrackerSparqlVariableBindingListClass;
120 typedef struct _TrackerSparqlVariableBindingListPrivate TrackerSparqlVariableBindingListPrivate;
121 #define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))
122 typedef struct _TrackerSparqlVariablePrivate TrackerSparqlVariablePrivate;
123
124 #define TRACKER_SPARQL_TYPE_CONTEXT (tracker_sparql_context_get_type ())
125 #define TRACKER_SPARQL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContext))
126 #define TRACKER_SPARQL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContextClass))
127 #define TRACKER_SPARQL_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_CONTEXT))
128 #define TRACKER_SPARQL_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_CONTEXT))
129 #define TRACKER_SPARQL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContextClass))
130
131 typedef struct _TrackerSparqlContext TrackerSparqlContext;
132 typedef struct _TrackerSparqlContextClass TrackerSparqlContextClass;
133 typedef struct _TrackerSparqlContextPrivate TrackerSparqlContextPrivate;
134
135 #define TRACKER_SPARQL_TYPE_QUERY (tracker_sparql_query_get_type ())
136 #define TRACKER_SPARQL_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQuery))
137 #define TRACKER_SPARQL_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryClass))
138 #define TRACKER_SPARQL_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_QUERY))
139 #define TRACKER_SPARQL_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_QUERY))
140 #define TRACKER_SPARQL_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryClass))
141
142 typedef struct _TrackerSparqlQuery TrackerSparqlQuery;
143 typedef struct _TrackerSparqlQueryClass TrackerSparqlQueryClass;
144 #define _tracker_sparql_context_unref0(var) ((var == NULL) ? NULL : (var = (tracker_sparql_context_unref (var), NULL)))
145 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
146 typedef struct _TrackerSparqlQueryPrivate TrackerSparqlQueryPrivate;
147
148 #define TRACKER_SPARQL_TYPE_EXPRESSION (tracker_sparql_expression_get_type ())
149 #define TRACKER_SPARQL_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpression))
150 #define TRACKER_SPARQL_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpressionClass))
151 #define TRACKER_SPARQL_IS_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_EXPRESSION))
152 #define TRACKER_SPARQL_IS_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_EXPRESSION))
153 #define TRACKER_SPARQL_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_EXPRESSION, TrackerSparqlExpressionClass))
154
155 typedef struct _TrackerSparqlExpression TrackerSparqlExpression;
156 typedef struct _TrackerSparqlExpressionClass TrackerSparqlExpressionClass;
157
158 #define TRACKER_SPARQL_TYPE_PATTERN (tracker_sparql_pattern_get_type ())
159 #define TRACKER_SPARQL_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPattern))
160 #define TRACKER_SPARQL_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternClass))
161 #define TRACKER_SPARQL_IS_PATTERN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_PATTERN))
162 #define TRACKER_SPARQL_IS_PATTERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_PATTERN))
163 #define TRACKER_SPARQL_PATTERN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_PATTERN, TrackerSparqlPatternClass))
164
165 typedef struct _TrackerSparqlPattern TrackerSparqlPattern;
166 typedef struct _TrackerSparqlPatternClass TrackerSparqlPatternClass;
167 typedef struct _TrackerSparqlParamSpecContext TrackerSparqlParamSpecContext;
168
169 #define TRACKER_SPARQL_TYPE_SELECT_CONTEXT (tracker_sparql_select_context_get_type ())
170 #define TRACKER_SPARQL_SELECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContext))
171 #define TRACKER_SPARQL_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContextClass))
172 #define TRACKER_SPARQL_IS_SELECT_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT))
173 #define TRACKER_SPARQL_IS_SELECT_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_SELECT_CONTEXT))
174 #define TRACKER_SPARQL_SELECT_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContextClass))
175
176 typedef struct _TrackerSparqlSelectContext TrackerSparqlSelectContext;
177 typedef struct _TrackerSparqlSelectContextClass TrackerSparqlSelectContextClass;
178 typedef struct _TrackerSparqlSelectContextPrivate TrackerSparqlSelectContextPrivate;
179
180 #define TRACKER_SPARQL_TYPE_SOLUTION (tracker_sparql_solution_get_type ())
181 #define TRACKER_SPARQL_SOLUTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolution))
182 #define TRACKER_SPARQL_SOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolutionClass))
183 #define TRACKER_SPARQL_IS_SOLUTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_SOLUTION))
184 #define TRACKER_SPARQL_IS_SOLUTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_SOLUTION))
185 #define TRACKER_SPARQL_SOLUTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolutionClass))
186
187 typedef struct _TrackerSparqlSolution TrackerSparqlSolution;
188 typedef struct _TrackerSparqlSolutionClass TrackerSparqlSolutionClass;
189 typedef struct _TrackerSparqlSolutionPrivate TrackerSparqlSolutionPrivate;
190 #define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
191 typedef struct _TrackerSparqlParamSpecSolution TrackerSparqlParamSpecSolution;
192
193 #define TRACKER_TYPE_SPARQL_SCANNER (tracker_sparql_scanner_get_type ())
194 #define TRACKER_SPARQL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_SPARQL_SCANNER, TrackerSparqlScanner))
195 #define TRACKER_SPARQL_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_SPARQL_SCANNER, TrackerSparqlScannerClass))
196 #define TRACKER_IS_SPARQL_SCANNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_SPARQL_SCANNER))
197 #define TRACKER_IS_SPARQL_SCANNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_SPARQL_SCANNER))
198 #define TRACKER_SPARQL_SCANNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_SPARQL_SCANNER, TrackerSparqlScannerClass))
199
200 typedef struct _TrackerSparqlScanner TrackerSparqlScanner;
201 typedef struct _TrackerSparqlScannerClass TrackerSparqlScannerClass;
202
203 #define TRACKER_SPARQL_QUERY_TYPE_TOKEN_INFO (tracker_sparql_query_token_info_get_type ())
204
205 #define TRACKER_TYPE_SPARQL_TOKEN_TYPE (tracker_sparql_token_type_get_type ())
206
207 #define TRACKER_TYPE_SOURCE_LOCATION (tracker_source_location_get_type ())
208 typedef struct _TrackerSourceLocation TrackerSourceLocation;
209 typedef struct _TrackerSparqlQueryTokenInfo TrackerSparqlQueryTokenInfo;
210 #define _g_checksum_free0(var) ((var == NULL) ? NULL : (var = (g_checksum_free (var), NULL)))
211 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
212 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
213 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
214 #define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
215 typedef struct _TrackerSparqlPatternPrivate TrackerSparqlPatternPrivate;
216 #define _g_list_free0(var) ((var == NULL) ? NULL : (var = (g_list_free (var), NULL)))
217 #define _tracker_sparql_solution_unref0(var) ((var == NULL) ? NULL : (var = (tracker_sparql_solution_unref (var), NULL)))
218 #define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
219
220 typedef enum {
221 TRACKER_SPARQL_VARIABLE_STATE_NONE,
222 TRACKER_SPARQL_VARIABLE_STATE_BOUND,
223 TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL
224 } TrackerSparqlVariableState;
225
226 struct _TrackerSparqlDataTable {
227 GObject parent_instance;
228 TrackerSparqlDataTablePrivate * priv;
229 gchar* sql_db_tablename;
230 gchar* sql_query_tablename;
231 TrackerSparqlPredicateVariable* predicate_variable;
232 };
233
234 struct _TrackerSparqlDataTableClass {
235 GObjectClass parent_class;
236 };
237
238 struct _TrackerSparqlDataBinding {
239 GObject parent_instance;
240 TrackerSparqlDataBindingPrivate * priv;
241 TrackerPropertyType data_type;
242 TrackerSparqlDataTable* table;
243 gchar* sql_db_column_name;
244 };
245
246 struct _TrackerSparqlDataBindingClass {
247 GObjectClass parent_class;
248 };
249
250 struct _TrackerSparqlDataBindingPrivate {
251 gchar* _sql_expression;
252 };
253
254 struct _TrackerSparqlLiteralBinding {
255 TrackerSparqlDataBinding parent_instance;
256 TrackerSparqlLiteralBindingPrivate * priv;
257 gboolean is_fts_match;
258 gchar* literal;
259 };
260
261 struct _TrackerSparqlLiteralBindingClass {
262 TrackerSparqlDataBindingClass parent_class;
263 };
264
265 struct _TrackerSparqlVariableBinding {
266 TrackerSparqlDataBinding parent_instance;
267 TrackerSparqlVariableBindingPrivate * priv;
268 TrackerSparqlVariable* variable;
269 gboolean maybe_null;
270 gboolean in_simple_optional;
271 TrackerClass* type;
272 };
273
274 struct _TrackerSparqlVariableBindingClass {
275 TrackerSparqlDataBindingClass parent_class;
276 };
277
278 struct _TrackerSparqlVariableBindingList {
279 GObject parent_instance;
280 TrackerSparqlVariableBindingListPrivate * priv;
281 GList* list;
282 };
283
284 struct _TrackerSparqlVariableBindingListClass {
285 GObjectClass parent_class;
286 };
287
288 struct _TrackerSparqlVariable {
289 GObject parent_instance;
290 TrackerSparqlVariablePrivate * priv;
291 TrackerSparqlVariableBinding* binding;
292 };
293
294 struct _TrackerSparqlVariableClass {
295 GObjectClass parent_class;
296 };
297
298 struct _TrackerSparqlVariablePrivate {
299 gchar* _name;
300 gint _index;
301 gchar* _sql_expression;
302 gchar* sql_identifier;
303 };
304
305 struct _TrackerSparqlContext {
306 GTypeInstance parent_instance;
307 volatile int ref_count;
308 TrackerSparqlContextPrivate * priv;
309 TrackerSparqlQuery* query;
310 TrackerSparqlContext* parent_context;
311 GHashTable* var_set;
312 GHashTable* var_map;
313 GHashTable* select_var_set;
314 GHashTable* predicate_variable_map;
315 gboolean scalar_subquery;
316 };
317
318 struct _TrackerSparqlContextClass {
319 GTypeClass parent_class;
320 void (*finalize) (TrackerSparqlContext *self);
321 };
322
323 struct _TrackerSparqlQuery {
324 GObject parent_instance;
325 TrackerSparqlQueryPrivate * priv;
326 TrackerSparqlExpression* expression;
327 TrackerSparqlPattern* pattern;
328 GList* bindings;
329 TrackerSparqlContext* context;
330 gint last_var_index;
331 };
332
333 struct _TrackerSparqlQueryClass {
334 GObjectClass parent_class;
335 };
336
337 struct _TrackerSparqlParamSpecContext {
338 GParamSpec parent_instance;
339 };
340
341 struct _TrackerSparqlSelectContext {
342 TrackerSparqlContext parent_instance;
343 TrackerSparqlSelectContextPrivate * priv;
344 TrackerPropertyType type;
345 TrackerPropertyType* types;
346 gint types_length1;
347 gint _types_size_;
348 gchar** variable_names;
349 gint variable_names_length1;
350 gint _variable_names_size_;
351 };
352
353 struct _TrackerSparqlSelectContextClass {
354 TrackerSparqlContextClass parent_class;
355 };
356
357 struct _TrackerSparqlSolution {
358 GTypeInstance parent_instance;
359 volatile int ref_count;
360 TrackerSparqlSolutionPrivate * priv;
361 GHashTable* hash;
362 GPtrArray* values;
363 gint solution_index;
364 };
365
366 struct _TrackerSparqlSolutionClass {
367 GTypeClass parent_class;
368 void (*finalize) (TrackerSparqlSolution *self);
369 };
370
371 struct _TrackerSparqlParamSpecSolution {
372 GParamSpec parent_instance;
373 };
374
375 typedef enum {
376 TRACKER_SPARQL_TOKEN_TYPE_NONE,
377 TRACKER_SPARQL_TOKEN_TYPE_A,
378 TRACKER_SPARQL_TOKEN_TYPE_AS,
379 TRACKER_SPARQL_TOKEN_TYPE_ASC,
380 TRACKER_SPARQL_TOKEN_TYPE_ASK,
381 TRACKER_SPARQL_TOKEN_TYPE_ATBASE,
382 TRACKER_SPARQL_TOKEN_TYPE_ATPREFIX,
383 TRACKER_SPARQL_TOKEN_TYPE_AVG,
384 TRACKER_SPARQL_TOKEN_TYPE_BASE,
385 TRACKER_SPARQL_TOKEN_TYPE_BLANK_NODE,
386 TRACKER_SPARQL_TOKEN_TYPE_BOUND,
387 TRACKER_SPARQL_TOKEN_TYPE_BY,
388 TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE,
389 TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACKET,
390 TRACKER_SPARQL_TOKEN_TYPE_CLOSE_PARENS,
391 TRACKER_SPARQL_TOKEN_TYPE_COALESCE,
392 TRACKER_SPARQL_TOKEN_TYPE_COLON,
393 TRACKER_SPARQL_TOKEN_TYPE_COMMA,
394 TRACKER_SPARQL_TOKEN_TYPE_CONSTRUCT,
395 TRACKER_SPARQL_TOKEN_TYPE_COUNT,
396 TRACKER_SPARQL_TOKEN_TYPE_DATA,
(emitted by cppcheck) 397 TRACKER_SPARQL_TOKEN_TYPE_DATATYPE,
398 TRACKER_SPARQL_TOKEN_TYPE_DECIMAL,
399 TRACKER_SPARQL_TOKEN_TYPE_DELETE,
400 TRACKER_SPARQL_TOKEN_TYPE_DESC,
401 TRACKER_SPARQL_TOKEN_TYPE_DESCRIBE,
402 TRACKER_SPARQL_TOKEN_TYPE_DISTINCT,
403 TRACKER_SPARQL_TOKEN_TYPE_DIV,
404 TRACKER_SPARQL_TOKEN_TYPE_DOT,
405 TRACKER_SPARQL_TOKEN_TYPE_DOUBLE,
406 TRACKER_SPARQL_TOKEN_TYPE_DOUBLE_CIRCUMFLEX,
407 TRACKER_SPARQL_TOKEN_TYPE_DROP,
408 TRACKER_SPARQL_TOKEN_TYPE_EOF,
409 TRACKER_SPARQL_TOKEN_TYPE_EXISTS,
410 TRACKER_SPARQL_TOKEN_TYPE_FALSE,
411 TRACKER_SPARQL_TOKEN_TYPE_FILTER,
412 TRACKER_SPARQL_TOKEN_TYPE_FROM,
413 TRACKER_SPARQL_TOKEN_TYPE_GRAPH,
414 TRACKER_SPARQL_TOKEN_TYPE_GROUP,
415 TRACKER_SPARQL_TOKEN_TYPE_GROUP_CONCAT,
416 TRACKER_SPARQL_TOKEN_TYPE_HAVING,
417 TRACKER_SPARQL_TOKEN_TYPE_IF,
418 TRACKER_SPARQL_TOKEN_TYPE_INSERT,
419 TRACKER_SPARQL_TOKEN_TYPE_INTEGER,
420 TRACKER_SPARQL_TOKEN_TYPE_INTO,
421 TRACKER_SPARQL_TOKEN_TYPE_IRI_REF,
422 TRACKER_SPARQL_TOKEN_TYPE_ISBLANK,
423 TRACKER_SPARQL_TOKEN_TYPE_ISIRI,
424 TRACKER_SPARQL_TOKEN_TYPE_ISLITERAL,
425 TRACKER_SPARQL_TOKEN_TYPE_ISURI,
426 TRACKER_SPARQL_TOKEN_TYPE_LANG,
427 TRACKER_SPARQL_TOKEN_TYPE_LANGMATCHES,
428 TRACKER_SPARQL_TOKEN_TYPE_LIMIT,
429 TRACKER_SPARQL_TOKEN_TYPE_MAX,
430 TRACKER_SPARQL_TOKEN_TYPE_MIN,
431 TRACKER_SPARQL_TOKEN_TYPE_MINUS,
432 TRACKER_SPARQL_TOKEN_TYPE_NAMED,
433 TRACKER_SPARQL_TOKEN_TYPE_NOT,
434 TRACKER_SPARQL_TOKEN_TYPE_NULL,
435 TRACKER_SPARQL_TOKEN_TYPE_OFFSET,
436 TRACKER_SPARQL_TOKEN_TYPE_OP_AND,
437 TRACKER_SPARQL_TOKEN_TYPE_OP_EQ,
438 TRACKER_SPARQL_TOKEN_TYPE_OP_GE,
439 TRACKER_SPARQL_TOKEN_TYPE_OP_GT,
440 TRACKER_SPARQL_TOKEN_TYPE_OP_LE,
441 TRACKER_SPARQL_TOKEN_TYPE_OP_LT,
442 TRACKER_SPARQL_TOKEN_TYPE_OP_NE,
443 TRACKER_SPARQL_TOKEN_TYPE_OP_NEG,
444 TRACKER_SPARQL_TOKEN_TYPE_OP_OR,
445 TRACKER_SPARQL_TOKEN_TYPE_OP_IN,
446 TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE,
447 TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACKET,
448 TRACKER_SPARQL_TOKEN_TYPE_OPEN_PARENS,
449 TRACKER_SPARQL_TOKEN_TYPE_OPTIONAL,
450 TRACKER_SPARQL_TOKEN_TYPE_OR,
451 TRACKER_SPARQL_TOKEN_TYPE_ORDER,
452 TRACKER_SPARQL_TOKEN_TYPE_PLUS,
453 TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX,
454 TRACKER_SPARQL_TOKEN_TYPE_PREFIX,
455 TRACKER_SPARQL_TOKEN_TYPE_REDUCED,
456 TRACKER_SPARQL_TOKEN_TYPE_REGEX,
457 TRACKER_SPARQL_TOKEN_TYPE_REPLACE,
458 TRACKER_SPARQL_TOKEN_TYPE_SAMETERM,
459 TRACKER_SPARQL_TOKEN_TYPE_SELECT,
460 TRACKER_SPARQL_TOKEN_TYPE_SEMICOLON,
461 TRACKER_SPARQL_TOKEN_TYPE_SILENT,
462 TRACKER_SPARQL_TOKEN_TYPE_STAR,
463 TRACKER_SPARQL_TOKEN_TYPE_STR,
464 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL1,
465 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL2,
466 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG1,
467 TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG2,
468 TRACKER_SPARQL_TOKEN_TYPE_SUM,
469 TRACKER_SPARQL_TOKEN_TYPE_TRUE,
470 TRACKER_SPARQL_TOKEN_TYPE_UNION,
471 TRACKER_SPARQL_TOKEN_TYPE_VAR,
472 TRACKER_SPARQL_TOKEN_TYPE_WHERE,
473 TRACKER_SPARQL_TOKEN_TYPE_WITH
474 } TrackerSparqlTokenType;
475
476 struct _TrackerSourceLocation {
477 gchar* pos;
478 gint line;
479 gint column;
480 };
481
482 struct _TrackerSparqlQueryTokenInfo {
483 TrackerSparqlTokenType type;
484 TrackerSourceLocation begin;
485 TrackerSourceLocation end;
486 };
487
488 struct _TrackerSparqlQueryPrivate {
489 TrackerSparqlScanner* scanner;
490 TrackerSparqlQueryTokenInfo* tokens;
491 gint tokens_length1;
492 gint _tokens_size_;
493 gint index;
494 gint size;
495 gchar* query_string;
496 gboolean update_extensions;
497 gchar* current_graph;
498 gchar* current_subject;
499 gboolean current_subject_is_var;
500 gchar* current_predicate;
501 gboolean current_predicate_is_var;
502 gboolean silent;
503 GHashTable* prefix_map;
504 gboolean delete_statements;
505 gboolean update_statements;
506 gint bnodeid;
507 guchar* base_uuid;
508 gint base_uuid_length1;
509 gint _base_uuid_size_;
510 GHashTable* blank_nodes;
511 gboolean _no_cache;
512 gboolean anon_blank_node_open;
513 };
514
515 struct _TrackerSparqlPattern {
516 GObject parent_instance;
517 TrackerSparqlPatternPrivate * priv;
518 gchar* current_graph;
519 TrackerSparqlVariable* fts_subject;
520 gchar** fts_variables;
521 gint fts_variables_length1;
522 gint _fts_variables_size_;
523 GString* match_str;
524 gboolean queries_fts_data;
525 };
526
527 struct _TrackerSparqlPatternClass {
528 GObjectClass parent_class;
529 };
530
531
532 static gpointer tracker_sparql_data_table_parent_class = NULL;
533 static gpointer tracker_sparql_data_binding_parent_class = NULL;
534 static gpointer tracker_sparql_literal_binding_parent_class = NULL;
535 static gpointer tracker_sparql_variable_binding_parent_class = NULL;
536 static gpointer tracker_sparql_variable_binding_list_parent_class = NULL;
537 static gpointer tracker_sparql_variable_parent_class = NULL;
538 static gpointer tracker_sparql_context_parent_class = NULL;
539 static gpointer tracker_sparql_select_context_parent_class = NULL;
540 static gpointer tracker_sparql_solution_parent_class = NULL;
541 static gpointer tracker_sparql_query_parent_class = NULL;
542
543 GType tracker_sparql_variable_state_get_type (void) G_GNUC_CONST;
544 GType tracker_sparql_data_table_get_type (void) G_GNUC_CONST;
545 GType tracker_sparql_predicate_variable_get_type (void) G_GNUC_CONST;
546 enum {
547 TRACKER_SPARQL_DATA_TABLE_DUMMY_PROPERTY
548 };
549 TrackerSparqlDataTable* tracker_sparql_data_table_new (void);
550 TrackerSparqlDataTable* tracker_sparql_data_table_construct (GType object_type);
551 static void tracker_sparql_data_table_finalize (GObject* obj);
552 GType tracker_sparql_data_binding_get_type (void) G_GNUC_CONST;
553 #define TRACKER_SPARQL_DATA_BINDING_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBindingPrivate))
554 enum {
555 TRACKER_SPARQL_DATA_BINDING_DUMMY_PROPERTY,
556 TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION
557 };
558 gchar* tracker_sparql_data_binding_get_extra_sql_expression (TrackerSparqlDataBinding* self, const gchar* suffix);
559 TrackerSparqlDataBinding* tracker_sparql_data_binding_construct (GType object_type);
560 const gchar* tracker_sparql_data_binding_get_sql_expression (TrackerSparqlDataBinding* self);
561 void tracker_sparql_data_binding_set_sql_expression (TrackerSparqlDataBinding* self, const gchar* value);
562 static void tracker_sparql_data_binding_finalize (GObject* obj);
563 static void _vala_tracker_sparql_data_binding_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
564 static void _vala_tracker_sparql_data_binding_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
565 GType tracker_sparql_literal_binding_get_type (void) G_GNUC_CONST;
566 enum {
567 TRACKER_SPARQL_LITERAL_BINDING_DUMMY_PROPERTY
568 };
569 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_new (void);
570 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_construct (GType object_type);
571 static void tracker_sparql_literal_binding_finalize (GObject* obj);
572 GType tracker_sparql_variable_binding_get_type (void) G_GNUC_CONST;
573 GType tracker_sparql_variable_get_type (void) G_GNUC_CONST;
574 enum {
575 TRACKER_SPARQL_VARIABLE_BINDING_DUMMY_PROPERTY
576 };
577 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_new (void);
578 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_construct (GType object_type);
579 static void tracker_sparql_variable_binding_finalize (GObject* obj);
580 GType tracker_sparql_variable_binding_list_get_type (void) G_GNUC_CONST;
581 enum {
582 TRACKER_SPARQL_VARIABLE_BINDING_LIST_DUMMY_PROPERTY
583 };
584 static void _g_object_unref0_ (gpointer var);
585 static void _g_list_free__g_object_unref0_ (GList* self);
586 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_new (void);
587 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_construct (GType object_type);
588 static void tracker_sparql_variable_binding_list_finalize (GObject* obj);
589 #define TRACKER_SPARQL_VARIABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariablePrivate))
590 enum {
591 TRACKER_SPARQL_VARIABLE_DUMMY_PROPERTY,
592 TRACKER_SPARQL_VARIABLE_NAME,
593 TRACKER_SPARQL_VARIABLE_INDEX,
594 TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION
595 };
596 TrackerSparqlVariable* tracker_sparql_variable_new (const gchar* name, gint index);
597 TrackerSparqlVariable* tracker_sparql_variable_construct (GType object_type, const gchar* name, gint index);
598 static void tracker_sparql_variable_set_name (TrackerSparqlVariable* self, const gchar* value);
599 static void tracker_sparql_variable_set_index (TrackerSparqlVariable* self, gint value);
600 static void tracker_sparql_variable_set_sql_expression (TrackerSparqlVariable* self, const gchar* value);
601 gchar* tracker_sparql_variable_get_extra_sql_expression (TrackerSparqlVariable* self, const gchar* suffix);
602 gboolean tracker_sparql_variable_equal (TrackerSparqlVariable* a, TrackerSparqlVariable* b);
603 gint tracker_sparql_variable_get_index (TrackerSparqlVariable* self);
604 guint tracker_sparql_variable_hash (TrackerSparqlVariable* variable);
605 const gchar* tracker_sparql_variable_get_name (TrackerSparqlVariable* self);
606 const gchar* tracker_sparql_variable_get_sql_expression (TrackerSparqlVariable* self);
607 static void tracker_sparql_variable_finalize (GObject* obj);
608 static void _vala_tracker_sparql_variable_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
609 static void _vala_tracker_sparql_variable_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
610 gpointer tracker_sparql_context_ref (gpointer instance);
611 void tracker_sparql_context_unref (gpointer instance);
612 GParamSpec* tracker_sparql_param_spec_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
613 void tracker_sparql_value_set_context (GValue* value, gpointer v_object);
614 void tracker_sparql_value_take_context (GValue* value, gpointer v_object);
615 gpointer tracker_sparql_value_get_context (const GValue* value);
616 GType tracker_sparql_context_get_type (void) G_GNUC_CONST;
617 GType tracker_sparql_query_get_type (void) G_GNUC_CONST;
618 enum {
619 TRACKER_SPARQL_CONTEXT_DUMMY_PROPERTY
620 };
621 TrackerSparqlContext* tracker_sparql_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
622 TrackerSparqlContext* tracker_sparql_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
623 static guint _tracker_sparql_variable_hash_ghash_func (gconstpointer key);
624 static gboolean _tracker_sparql_variable_equal_gequal_func (gconstpointer a, gconstpointer b);
625 TrackerSparqlContext* tracker_sparql_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
626 TrackerSparqlContext* tracker_sparql_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
627 TrackerSparqlVariable* tracker_sparql_context_get_variable (TrackerSparqlContext* self, const gchar* name);
628 GType tracker_sparql_expression_get_type (void) G_GNUC_CONST;
629 GType tracker_sparql_pattern_get_type (void) G_GNUC_CONST;
630 static void tracker_sparql_context_finalize (TrackerSparqlContext* obj);
631 GType tracker_sparql_select_context_get_type (void) G_GNUC_CONST;
632 enum {
633 TRACKER_SPARQL_SELECT_CONTEXT_DUMMY_PROPERTY
634 };
635 TrackerSparqlSelectContext* tracker_sparql_select_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
636 TrackerSparqlSelectContext* tracker_sparql_select_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
637 TrackerSparqlSelectContext* tracker_sparql_select_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
638 TrackerSparqlSelectContext* tracker_sparql_select_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context);
639 static void tracker_sparql_select_context_finalize (TrackerSparqlContext* obj);
640 gpointer tracker_sparql_solution_ref (gpointer instance);
641 void tracker_sparql_solution_unref (gpointer instance);
642 GParamSpec* tracker_sparql_param_spec_solution (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
643 void tracker_sparql_value_set_solution (GValue* value, gpointer v_object);
644 void tracker_sparql_value_take_solution (GValue* value, gpointer v_object);
645 gpointer tracker_sparql_value_get_solution (const GValue* value);
646 GType tracker_sparql_solution_get_type (void) G_GNUC_CONST;
647 enum {
648 TRACKER_SPARQL_SOLUTION_DUMMY_PROPERTY
649 };
650 TrackerSparqlSolution* tracker_sparql_solution_new (void);
651 TrackerSparqlSolution* tracker_sparql_solution_construct (GType object_type);
652 static void _g_free0_ (gpointer var);
653 gchar* tracker_sparql_solution_lookup (TrackerSparqlSolution* self, const gchar* variable_name);
654 static void tracker_sparql_solution_finalize (TrackerSparqlSolution* obj);
655 GType tracker_sparql_scanner_get_type (void) G_GNUC_CONST;
656 static GType tracker_sparql_query_token_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
657 GType tracker_sparql_token_type_get_type (void) G_GNUC_CONST;
658 GType tracker_source_location_get_type (void) G_GNUC_CONST;
659 TrackerSourceLocation* tracker_source_location_dup (const TrackerSourceLocation* self);
660 void tracker_source_location_free (TrackerSourceLocation* self);
661 static TrackerSparqlQueryTokenInfo* tracker_sparql_query_token_info_dup (const TrackerSparqlQueryTokenInfo* self);
662 static void tracker_sparql_query_token_info_free (TrackerSparqlQueryTokenInfo* self);
663 #define TRACKER_SPARQL_QUERY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQueryPrivate))
664 enum {
665 TRACKER_SPARQL_QUERY_DUMMY_PROPERTY,
666 TRACKER_SPARQL_QUERY_NO_CACHE
667 };
668 #define TRACKER_SPARQL_QUERY_BUFFER_SIZE 32
669 #define TRACKER_SPARQL_QUERY_FN_NS "http://www.w3.org/2005/xpath-functions#"
670 TrackerSparqlQuery* tracker_sparql_query_new (const gchar* query);
671 TrackerSparqlQuery* tracker_sparql_query_construct (GType object_type, const gchar* query);
672 void tracker_sparql_query_set_no_cache (TrackerSparqlQuery* self, gboolean value);
673 void uuid_generate (guchar* uuid);
674 TrackerSparqlExpression* tracker_sparql_expression_new (TrackerSparqlQuery* query);
675 TrackerSparqlExpression* tracker_sparql_expression_construct (GType object_type, TrackerSparqlQuery* query);
676 TrackerSparqlPattern* tracker_sparql_pattern_new (TrackerSparqlQuery* query);
677 TrackerSparqlPattern* tracker_sparql_pattern_construct (GType object_type, TrackerSparqlQuery* query);
678 TrackerSparqlQuery* tracker_sparql_query_new_update (const gchar* query);
679 TrackerSparqlQuery* tracker_sparql_query_construct_update (GType object_type, const gchar* query);
680 static gchar* tracker_sparql_query_get_uuid_for_name (TrackerSparqlQuery* self, guchar* base_uuid, int base_uuid_length1, const gchar* name);
681 gchar* tracker_sparql_query_generate_bnodeid (TrackerSparqlQuery* self, const gchar* user_bnodeid);
682 gboolean tracker_sparql_query_next (TrackerSparqlQuery* self, GError** error);
683 TrackerSparqlTokenType tracker_sparql_scanner_read_token (TrackerSparqlScanner* self, TrackerSourceLocation* token_begin, TrackerSourceLocation* token_end, GError** error);
684 TrackerSparqlTokenType tracker_sparql_query_current (TrackerSparqlQuery* self);
685 TrackerSparqlTokenType tracker_sparql_query_last (TrackerSparqlQuery* self);
686 gboolean tracker_sparql_query_accept (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error);
687 GError* tracker_sparql_query_get_error (TrackerSparqlQuery* self, const gchar* msg);
688 GError* tracker_sparql_query_get_internal_error (TrackerSparqlQuery* self, const gchar* msg);
689 gboolean tracker_sparql_query_expect (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error);
690 const gchar* tracker_sparql_token_type_to_string (TrackerSparqlTokenType self);
691 void tracker_sparql_query_get_location (TrackerSparqlQuery* self, TrackerSourceLocation* result);
692 void tracker_sparql_query_set_location (TrackerSparqlQuery* self, TrackerSourceLocation* location);
693 void tracker_sparql_scanner_seek (TrackerSparqlScanner* self, TrackerSourceLocation* location);
694 gchar* tracker_sparql_query_get_last_string (TrackerSparqlQuery* self, gint strip);
695 static void tracker_sparql_query_parse_prologue (TrackerSparqlQuery* self, GError** error);
696 static void tracker_sparql_query_prepare_execute (TrackerSparqlQuery* self, GError** error);
697 TrackerSparqlScanner* tracker_sparql_scanner_new (gchar* input, gsize len);
698 TrackerSparqlScanner* tracker_sparql_scanner_construct (GType object_type, gchar* input, gsize len);
699 TrackerDBCursor* tracker_sparql_query_execute_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error);
700 static TrackerDBCursor* tracker_sparql_query_execute_select_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error);
701 static TrackerDBCursor* tracker_sparql_query_execute_ask_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error);
702 GVariant* tracker_sparql_query_execute_update (TrackerSparqlQuery* self, gboolean blank, GError** error);
703 static void tracker_sparql_query_execute_insert_or_delete (TrackerSparqlQuery* self, GVariantBuilder* update_blank_nodes, GError** error);
704 static TrackerDBStatement* tracker_sparql_query_prepare_for_exec (TrackerSparqlQuery* self, const gchar* sql, GError** error);
705 gboolean tracker_sparql_query_get_no_cache (TrackerSparqlQuery* self);
706 static TrackerDBCursor* tracker_sparql_query_exec_sql_cursor (TrackerSparqlQuery* self, const gchar* sql, TrackerPropertyType* types, int types_length1, gchar** variable_names, int variable_names_length1, gboolean threadsafe, GError** error);
707 static gchar* tracker_sparql_query_get_select_query (TrackerSparqlQuery* self, TrackerSparqlSelectContext** context, GError** error);
708 TrackerSparqlSelectContext* tracker_sparql_pattern_translate_select (TrackerSparqlPattern* self, GString* sql, gboolean subquery, gboolean scalar_subquery, GError** error);
709 static gchar* tracker_sparql_query_get_ask_query (TrackerSparqlQuery* self, GError** error);
710 TrackerSparqlContext* tracker_sparql_pattern_translate_group_graph_pattern (TrackerSparqlPattern* self, GString* sql, GError** error);
711 static void tracker_sparql_query_parse_from_or_into_param (TrackerSparqlQuery* self, GError** error);
712 gchar* tracker_sparql_query_resolve_prefixed_name (TrackerSparqlQuery* self, const gchar* prefix, const gchar* local_name, GError** error);
713 static void tracker_sparql_query_skip_braces (TrackerSparqlQuery* self, GError** error);
714 void tracker_sparql_expression_append_expression_as_string (GString* sql, const gchar* expression, TrackerPropertyType type);
715 static void tracker_sparql_query_parse_construct_triples_block (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error);
716 static GVariant* _variant_new1 (GHashTable* value);
717 static gchar* tracker_sparql_query_parse_construct_var_or_term (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, gboolean* is_null, GError** error);
718 static void tracker_sparql_query_parse_construct_property_list_not_empty (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error);
719 gchar* tracker_sparql_expression_parse_string_literal (TrackerSparqlExpression* self, TrackerPropertyType* type, GError** error);
720 static void tracker_sparql_query_parse_construct_object_list (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error);
721 static void tracker_sparql_query_parse_construct_object (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error);
722 static void tracker_sparql_query_finalize (GObject* obj);
723 static void _vala_tracker_sparql_query_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
724 static void _vala_tracker_sparql_query_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
725 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
726 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
727
728
729 GType tracker_sparql_variable_state_get_type (void) {
730 static volatile gsize tracker_sparql_variable_state_type_id__volatile = 0;
731 if (g_once_init_enter (&tracker_sparql_variable_state_type_id__volatile)) {
732 static const GEnumValue values[] = {{TRACKER_SPARQL_VARIABLE_STATE_NONE, "TRACKER_SPARQL_VARIABLE_STATE_NONE", "none"}, {TRACKER_SPARQL_VARIABLE_STATE_BOUND, "TRACKER_SPARQL_VARIABLE_STATE_BOUND", "bound"}, {TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL, "TRACKER_SPARQL_VARIABLE_STATE_OPTIONAL", "optional"}, {0, NULL, NULL}};
733 GType tracker_sparql_variable_state_type_id;
734 tracker_sparql_variable_state_type_id = g_enum_register_static ("TrackerSparqlVariableState", values);
735 g_once_init_leave (&tracker_sparql_variable_state_type_id__volatile, tracker_sparql_variable_state_type_id);
736 }
737 return tracker_sparql_variable_state_type_id__volatile;
738 }
739
740
741 TrackerSparqlDataTable* tracker_sparql_data_table_construct (GType object_type) {
742 TrackerSparqlDataTable * self = NULL;
743 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
744 self = (TrackerSparqlDataTable*) g_object_new (object_type, NULL);
745 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
746 return self;
747 #line 748 "tracker-sparql-query.c"
748 }
749
750
751 TrackerSparqlDataTable* tracker_sparql_data_table_new (void) {
752 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
753 return tracker_sparql_data_table_construct (TRACKER_SPARQL_TYPE_DATA_TABLE);
754 #line 755 "tracker-sparql-query.c"
755 }
756
757
758 static void tracker_sparql_data_table_class_init (TrackerSparqlDataTableClass * klass) {
759 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
760 tracker_sparql_data_table_parent_class = g_type_class_peek_parent (klass);
761 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
762 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_data_table_finalize;
763 #line 764 "tracker-sparql-query.c"
764 }
765
766
767 static void tracker_sparql_data_table_instance_init (TrackerSparqlDataTable * self) {
768 }
769
770
771 static void tracker_sparql_data_table_finalize (GObject* obj) {
772 TrackerSparqlDataTable * self;
773 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
774 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_DATA_TABLE, TrackerSparqlDataTable);
775 #line 29 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
776 _g_free0 (self->sql_db_tablename);
777 #line 30 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
778 _g_free0 (self->sql_query_tablename);
779 #line 31 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
780 _g_object_unref0 (self->predicate_variable);
781 #line 28 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
782 G_OBJECT_CLASS (tracker_sparql_data_table_parent_class)->finalize (obj);
783 #line 784 "tracker-sparql-query.c"
784 }
785
786
787 GType tracker_sparql_data_table_get_type (void) {
788 static volatile gsize tracker_sparql_data_table_type_id__volatile = 0;
789 if (g_once_init_enter (&tracker_sparql_data_table_type_id__volatile)) {
790 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlDataTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_data_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlDataTable), 0, (GInstanceInitFunc) tracker_sparql_data_table_instance_init, NULL };
791 GType tracker_sparql_data_table_type_id;
792 tracker_sparql_data_table_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlDataTable", &g_define_type_info, 0);
793 g_once_init_leave (&tracker_sparql_data_table_type_id__volatile, tracker_sparql_data_table_type_id);
794 }
795 return tracker_sparql_data_table_type_id__volatile;
796 }
797
798
799 gchar* tracker_sparql_data_binding_get_extra_sql_expression (TrackerSparqlDataBinding* self, const gchar* suffix) {
800 gchar* result = NULL;
801 TrackerSparqlDataTable* _tmp0_;
802 const gchar* _tmp1_;
803 const gchar* _tmp2_;
804 const gchar* _tmp3_;
805 gchar* _tmp4_ = NULL;
806 #line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
807 g_return_val_if_fail (self != NULL, NULL);
808 #line 50 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
809 g_return_val_if_fail (suffix != NULL, NULL);
810 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
811 _tmp0_ = self->table;
812 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
813 _tmp1_ = _tmp0_->sql_query_tablename;
814 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
815 _tmp2_ = self->sql_db_column_name;
816 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
817 _tmp3_ = suffix;
818 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
819 _tmp4_ = g_strdup_printf ("\"%s\".\"%s:%s\"", _tmp1_, _tmp2_, _tmp3_);
820 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
821 result = _tmp4_;
822 #line 51 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
823 return result;
824 #line 825 "tracker-sparql-query.c"
825 }
826
827
828 TrackerSparqlDataBinding* tracker_sparql_data_binding_construct (GType object_type) {
829 TrackerSparqlDataBinding * self = NULL;
830 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
831 self = (TrackerSparqlDataBinding*) g_object_new (object_type, NULL);
832 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
833 return self;
834 #line 835 "tracker-sparql-query.c"
835 }
836
837
838 const gchar* tracker_sparql_data_binding_get_sql_expression (TrackerSparqlDataBinding* self) {
839 const gchar* result;
840 const gchar* _tmp0_;
841 const gchar* _tmp5_;
842 #line 39 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
843 g_return_val_if_fail (self != NULL, NULL);
844 #line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
845 _tmp0_ = self->priv->_sql_expression;
846 #line 40 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
847 if (_tmp0_ == NULL) {
848 #line 849 "tracker-sparql-query.c"
849 TrackerSparqlDataTable* _tmp1_;
850 const gchar* _tmp2_;
851 const gchar* _tmp3_;
852 gchar* _tmp4_ = NULL;
853 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
854 _tmp1_ = self->table;
855 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
856 _tmp2_ = _tmp1_->sql_query_tablename;
857 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
858 _tmp3_ = self->sql_db_column_name;
859 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
860 _tmp4_ = g_strdup_printf ("\"%s\".\"%s\"", _tmp2_, _tmp3_);
861 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
862 _g_free0 (self->priv->_sql_expression);
863 #line 41 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
864 self->priv->_sql_expression = _tmp4_;
865 #line 866 "tracker-sparql-query.c"
866 }
867 #line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
868 _tmp5_ = self->priv->_sql_expression;
869 #line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
870 result = _tmp5_;
871 #line 43 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
872 return result;
873 #line 874 "tracker-sparql-query.c"
874 }
875
876
877 void tracker_sparql_data_binding_set_sql_expression (TrackerSparqlDataBinding* self, const gchar* value) {
878 const gchar* _tmp0_;
879 gchar* _tmp1_;
880 #line 45 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
881 g_return_if_fail (self != NULL);
882 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
883 _tmp0_ = value;
884 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
885 _tmp1_ = g_strdup (_tmp0_);
886 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
887 _g_free0 (self->priv->_sql_expression);
888 #line 46 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
889 self->priv->_sql_expression = _tmp1_;
890 #line 45 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
891 g_object_notify ((GObject *) self, "sql-expression");
892 #line 893 "tracker-sparql-query.c"
893 }
894
895
896 static void tracker_sparql_data_binding_class_init (TrackerSparqlDataBindingClass * klass) {
897 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
898 tracker_sparql_data_binding_parent_class = g_type_class_peek_parent (klass);
899 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
900 g_type_class_add_private (klass, sizeof (TrackerSparqlDataBindingPrivate));
901 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
902 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_data_binding_get_property;
903 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
904 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_data_binding_set_property;
905 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
906 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_data_binding_finalize;
907 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
908 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION, g_param_spec_string ("sql-expression", "sql-expression", "sql-expression", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
909 #line 910 "tracker-sparql-query.c"
910 }
911
912
913 static void tracker_sparql_data_binding_instance_init (TrackerSparqlDataBinding * self) {
914 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
915 self->priv = TRACKER_SPARQL_DATA_BINDING_GET_PRIVATE (self);
916 #line 917 "tracker-sparql-query.c"
917 }
918
919
920 static void tracker_sparql_data_binding_finalize (GObject* obj) {
921 TrackerSparqlDataBinding * self;
922 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
923 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding);
924 #line 36 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
925 _g_object_unref0 (self->table);
926 #line 37 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
927 _g_free0 (self->sql_db_column_name);
928 #line 49 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
929 _g_free0 (self->priv->_sql_expression);
930 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
931 G_OBJECT_CLASS (tracker_sparql_data_binding_parent_class)->finalize (obj);
932 #line 933 "tracker-sparql-query.c"
933 }
934
935
936 GType tracker_sparql_data_binding_get_type (void) {
937 static volatile gsize tracker_sparql_data_binding_type_id__volatile = 0;
938 if (g_once_init_enter (&tracker_sparql_data_binding_type_id__volatile)) {
939 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlDataBindingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_data_binding_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlDataBinding), 0, (GInstanceInitFunc) tracker_sparql_data_binding_instance_init, NULL };
940 GType tracker_sparql_data_binding_type_id;
941 tracker_sparql_data_binding_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlDataBinding", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
942 g_once_init_leave (&tracker_sparql_data_binding_type_id__volatile, tracker_sparql_data_binding_type_id);
943 }
944 return tracker_sparql_data_binding_type_id__volatile;
945 }
946
947
948 static void _vala_tracker_sparql_data_binding_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
949 TrackerSparqlDataBinding * self;
950 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding);
951 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
952 switch (property_id) {
953 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
954 case TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION:
955 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
956 g_value_set_string (value, tracker_sparql_data_binding_get_sql_expression (self));
957 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
958 break;
959 #line 960 "tracker-sparql-query.c"
960 default:
961 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
962 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
963 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
964 break;
965 #line 966 "tracker-sparql-query.c"
966 }
967 }
968
969
970 static void _vala_tracker_sparql_data_binding_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
971 TrackerSparqlDataBinding * self;
972 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_DATA_BINDING, TrackerSparqlDataBinding);
973 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
974 switch (property_id) {
975 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
976 case TRACKER_SPARQL_DATA_BINDING_SQL_EXPRESSION:
977 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
978 tracker_sparql_data_binding_set_sql_expression (self, g_value_get_string (value));
979 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
980 break;
981 #line 982 "tracker-sparql-query.c"
982 default:
983 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
984 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
985 #line 34 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
986 break;
987 #line 988 "tracker-sparql-query.c"
988 }
989 }
990
991
992 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_construct (GType object_type) {
993 TrackerSparqlLiteralBinding * self = NULL;
994 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
995 self = (TrackerSparqlLiteralBinding*) tracker_sparql_data_binding_construct (object_type);
996 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
997 return self;
998 #line 999 "tracker-sparql-query.c"
999 }
1000
1001
1002 TrackerSparqlLiteralBinding* tracker_sparql_literal_binding_new (void) {
1003 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1004 return tracker_sparql_literal_binding_construct (TRACKER_SPARQL_TYPE_LITERAL_BINDING);
1005 #line 1006 "tracker-sparql-query.c"
1006 }
1007
1008
1009 static void tracker_sparql_literal_binding_class_init (TrackerSparqlLiteralBindingClass * klass) {
1010 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1011 tracker_sparql_literal_binding_parent_class = g_type_class_peek_parent (klass);
1012 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1013 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_literal_binding_finalize;
1014 #line 1015 "tracker-sparql-query.c"
1015 }
1016
1017
1018 static void tracker_sparql_literal_binding_instance_init (TrackerSparqlLiteralBinding * self) {
1019 }
1020
1021
1022 static void tracker_sparql_literal_binding_finalize (GObject* obj) {
1023 TrackerSparqlLiteralBinding * self;
1024 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1025 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_LITERAL_BINDING, TrackerSparqlLiteralBinding);
1026 #line 58 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1027 _g_free0 (self->literal);
1028 #line 56 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1029 G_OBJECT_CLASS (tracker_sparql_literal_binding_parent_class)->finalize (obj);
1030 #line 1031 "tracker-sparql-query.c"
1031 }
1032
1033
1034 GType tracker_sparql_literal_binding_get_type (void) {
1035 static volatile gsize tracker_sparql_literal_binding_type_id__volatile = 0;
1036 if (g_once_init_enter (&tracker_sparql_literal_binding_type_id__volatile)) {
1037 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlLiteralBindingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_literal_binding_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlLiteralBinding), 0, (GInstanceInitFunc) tracker_sparql_literal_binding_instance_init, NULL };
1038 GType tracker_sparql_literal_binding_type_id;
1039 tracker_sparql_literal_binding_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_DATA_BINDING, "TrackerSparqlLiteralBinding", &g_define_type_info, 0);
1040 g_once_init_leave (&tracker_sparql_literal_binding_type_id__volatile, tracker_sparql_literal_binding_type_id);
1041 }
1042 return tracker_sparql_literal_binding_type_id__volatile;
1043 }
1044
1045
1046 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_construct (GType object_type) {
1047 TrackerSparqlVariableBinding * self = NULL;
1048 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1049 self = (TrackerSparqlVariableBinding*) tracker_sparql_data_binding_construct (object_type);
1050 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1051 return self;
1052 #line 1053 "tracker-sparql-query.c"
1053 }
1054
1055
1056 TrackerSparqlVariableBinding* tracker_sparql_variable_binding_new (void) {
1057 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1058 return tracker_sparql_variable_binding_construct (TRACKER_SPARQL_TYPE_VARIABLE_BINDING);
1059 #line 1060 "tracker-sparql-query.c"
1060 }
1061
1062
1063 static void tracker_sparql_variable_binding_class_init (TrackerSparqlVariableBindingClass * klass) {
1064 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1065 tracker_sparql_variable_binding_parent_class = g_type_class_peek_parent (klass);
1066 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1067 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_variable_binding_finalize;
1068 #line 1069 "tracker-sparql-query.c"
1069 }
1070
1071
1072 static void tracker_sparql_variable_binding_instance_init (TrackerSparqlVariableBinding * self) {
1073 }
1074
1075
1076 static void tracker_sparql_variable_binding_finalize (GObject* obj) {
1077 TrackerSparqlVariableBinding * self;
1078 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1079 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_VARIABLE_BINDING, TrackerSparqlVariableBinding);
1080 #line 67 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1081 _g_object_unref0 (self->type);
1082 #line 62 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1083 G_OBJECT_CLASS (tracker_sparql_variable_binding_parent_class)->finalize (obj);
1084 #line 1085 "tracker-sparql-query.c"
1085 }
1086
1087
1088 GType tracker_sparql_variable_binding_get_type (void) {
1089 static volatile gsize tracker_sparql_variable_binding_type_id__volatile = 0;
1090 if (g_once_init_enter (&tracker_sparql_variable_binding_type_id__volatile)) {
1091 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlVariableBindingClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_variable_binding_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlVariableBinding), 0, (GInstanceInitFunc) tracker_sparql_variable_binding_instance_init, NULL };
1092 GType tracker_sparql_variable_binding_type_id;
1093 tracker_sparql_variable_binding_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_DATA_BINDING, "TrackerSparqlVariableBinding", &g_define_type_info, 0);
1094 g_once_init_leave (&tracker_sparql_variable_binding_type_id__volatile, tracker_sparql_variable_binding_type_id);
1095 }
1096 return tracker_sparql_variable_binding_type_id__volatile;
1097 }
1098
1099
1100 static void _g_object_unref0_ (gpointer var) {
1101 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1102 (var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
1103 #line 1104 "tracker-sparql-query.c"
1104 }
1105
1106
1107 static void _g_list_free__g_object_unref0_ (GList* self) {
1108 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1109 g_list_foreach (self, (GFunc) _g_object_unref0_, NULL);
1110 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1111 g_list_free (self);
1112 #line 1113 "tracker-sparql-query.c"
1113 }
1114
1115
1116 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_construct (GType object_type) {
1117 TrackerSparqlVariableBindingList * self = NULL;
1118 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1119 self = (TrackerSparqlVariableBindingList*) g_object_new (object_type, NULL);
1120 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1121 return self;
1122 #line 1123 "tracker-sparql-query.c"
1123 }
1124
1125
1126 TrackerSparqlVariableBindingList* tracker_sparql_variable_binding_list_new (void) {
1127 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1128 return tracker_sparql_variable_binding_list_construct (TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST);
1129 #line 1130 "tracker-sparql-query.c"
1130 }
1131
1132
1133 static void tracker_sparql_variable_binding_list_class_init (TrackerSparqlVariableBindingListClass * klass) {
1134 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1135 tracker_sparql_variable_binding_list_parent_class = g_type_class_peek_parent (klass);
1136 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1137 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_variable_binding_list_finalize;
1138 #line 1139 "tracker-sparql-query.c"
1139 }
1140
1141
1142 static void tracker_sparql_variable_binding_list_instance_init (TrackerSparqlVariableBindingList * self) {
1143 }
1144
1145
1146 static void tracker_sparql_variable_binding_list_finalize (GObject* obj) {
1147 TrackerSparqlVariableBindingList * self;
1148 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1149 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_VARIABLE_BINDING_LIST, TrackerSparqlVariableBindingList);
1150 #line 71 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1151 __g_list_free__g_object_unref0_0 (self->list);
1152 #line 70 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1153 G_OBJECT_CLASS (tracker_sparql_variable_binding_list_parent_class)->finalize (obj);
1154 #line 1155 "tracker-sparql-query.c"
1155 }
1156
1157
1158 GType tracker_sparql_variable_binding_list_get_type (void) {
1159 static volatile gsize tracker_sparql_variable_binding_list_type_id__volatile = 0;
1160 if (g_once_init_enter (&tracker_sparql_variable_binding_list_type_id__volatile)) {
1161 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlVariableBindingListClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_variable_binding_list_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlVariableBindingList), 0, (GInstanceInitFunc) tracker_sparql_variable_binding_list_instance_init, NULL };
1162 GType tracker_sparql_variable_binding_list_type_id;
1163 tracker_sparql_variable_binding_list_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlVariableBindingList", &g_define_type_info, 0);
1164 g_once_init_leave (&tracker_sparql_variable_binding_list_type_id__volatile, tracker_sparql_variable_binding_list_type_id);
1165 }
1166 return tracker_sparql_variable_binding_list_type_id__volatile;
1167 }
1168
1169
1170 TrackerSparqlVariable* tracker_sparql_variable_construct (GType object_type, const gchar* name, gint index) {
1171 TrackerSparqlVariable * self = NULL;
1172 const gchar* _tmp0_;
1173 gint _tmp1_;
1174 gint _tmp2_;
1175 gchar* _tmp3_ = NULL;
1176 const gchar* _tmp4_;
1177 gchar* _tmp5_ = NULL;
1178 gchar* _tmp6_;
1179 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1180 g_return_val_if_fail (name != NULL, NULL);
1181 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1182 self = (TrackerSparqlVariable*) g_object_new (object_type, NULL);
1183 #line 82 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1184 _tmp0_ = name;
1185 #line 82 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1186 tracker_sparql_variable_set_name (self, _tmp0_);
1187 #line 83 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1188 _tmp1_ = index;
1189 #line 83 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1190 tracker_sparql_variable_set_index (self, _tmp1_);
1191 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1192 _tmp2_ = index;
1193 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1194 _tmp3_ = g_strdup_printf ("%d_u", _tmp2_);
1195 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1196 _g_free0 (self->priv->sql_identifier);
1197 #line 84 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1198 self->priv->sql_identifier = _tmp3_;
1199 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1200 _tmp4_ = self->priv->sql_identifier;
1201 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1202 _tmp5_ = g_strdup_printf ("\"%s\"", _tmp4_);
1203 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1204 _tmp6_ = _tmp5_;
1205 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1206 tracker_sparql_variable_set_sql_expression (self, _tmp6_);
1207 #line 85 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1208 _g_free0 (_tmp6_);
1209 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1210 return self;
1211 #line 1212 "tracker-sparql-query.c"
1212 }
1213
1214
1215 TrackerSparqlVariable* tracker_sparql_variable_new (const gchar* name, gint index) {
1216 #line 81 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1217 return tracker_sparql_variable_construct (TRACKER_SPARQL_TYPE_VARIABLE, name, index);
1218 #line 1219 "tracker-sparql-query.c"
1219 }
1220
1221
1222 gchar* tracker_sparql_variable_get_extra_sql_expression (TrackerSparqlVariable* self, const gchar* suffix) {
1223 gchar* result = NULL;
1224 const gchar* _tmp0_;
1225 const gchar* _tmp1_;
1226 gchar* _tmp2_ = NULL;
1227 #line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1228 g_return_val_if_fail (self != NULL, NULL);
1229 #line 88 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1230 g_return_val_if_fail (suffix != NULL, NULL);
1231 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1232 _tmp0_ = self->priv->sql_identifier;
1233 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1234 _tmp1_ = suffix;
1235 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1236 _tmp2_ = g_strdup_printf ("\"%s:%s\"", _tmp0_, _tmp1_);
1237 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1238 result = _tmp2_;
1239 #line 89 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1240 return result;
1241 #line 1242 "tracker-sparql-query.c"
1242 }
1243
1244
1245 gboolean tracker_sparql_variable_equal (TrackerSparqlVariable* a, TrackerSparqlVariable* b) {
1246 gboolean result = FALSE;
1247 TrackerSparqlVariable* _tmp0_;
1248 gint _tmp1_;
1249 TrackerSparqlVariable* _tmp2_;
1250 gint _tmp3_;
1251 #line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1252 g_return_val_if_fail (a != NULL, FALSE);
1253 #line 92 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1254 g_return_val_if_fail (b != NULL, FALSE);
1255 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1256 _tmp0_ = a;
1257 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1258 _tmp1_ = _tmp0_->priv->_index;
1259 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1260 _tmp2_ = b;
1261 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1262 _tmp3_ = _tmp2_->priv->_index;
1263 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1264 result = _tmp1_ == _tmp3_;
1265 #line 93 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1266 return result;
1267 #line 1268 "tracker-sparql-query.c"
1268 }
1269
1270
1271 guint tracker_sparql_variable_hash (TrackerSparqlVariable* variable) {
1272 guint result = 0U;
1273 TrackerSparqlVariable* _tmp0_;
1274 gint _tmp1_;
1275 #line 96 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1276 g_return_val_if_fail (variable != NULL, 0U);
1277 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1278 _tmp0_ = variable;
1279 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1280 _tmp1_ = _tmp0_->priv->_index;
1281 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1282 result = (guint) _tmp1_;
1283 #line 97 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1284 return result;
1285 #line 1286 "tracker-sparql-query.c"
1286 }
1287
1288
1289 const gchar* tracker_sparql_variable_get_name (TrackerSparqlVariable* self) {
1290 const gchar* result;
1291 const gchar* _tmp0_;
1292 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1293 g_return_val_if_fail (self != NULL, NULL);
1294 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1295 _tmp0_ = self->priv->_name;
1296 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1297 result = _tmp0_;
1298 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1299 return result;
1300 #line 1301 "tracker-sparql-query.c"
1301 }
1302
1303
1304 static void tracker_sparql_variable_set_name (TrackerSparqlVariable* self, const gchar* value) {
1305 const gchar* _tmp0_;
1306 gchar* _tmp1_;
1307 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1308 g_return_if_fail (self != NULL);
1309 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1310 _tmp0_ = value;
1311 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1312 _tmp1_ = g_strdup (_tmp0_);
1313 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1314 _g_free0 (self->priv->_name);
1315 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1316 self->priv->_name = _tmp1_;
1317 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1318 g_object_notify ((GObject *) self, "name");
1319 #line 1320 "tracker-sparql-query.c"
1320 }
1321
1322
1323 gint tracker_sparql_variable_get_index (TrackerSparqlVariable* self) {
1324 gint result;
1325 gint _tmp0_;
1326 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1327 g_return_val_if_fail (self != NULL, 0);
1328 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1329 _tmp0_ = self->priv->_index;
1330 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1331 result = _tmp0_;
1332 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1333 return result;
1334 #line 1335 "tracker-sparql-query.c"
1335 }
1336
1337
1338 static void tracker_sparql_variable_set_index (TrackerSparqlVariable* self, gint value) {
1339 gint _tmp0_;
1340 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1341 g_return_if_fail (self != NULL);
1342 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1343 _tmp0_ = value;
1344 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1345 self->priv->_index = _tmp0_;
1346 #line 76 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1347 g_object_notify ((GObject *) self, "index");
1348 #line 1349 "tracker-sparql-query.c"
1349 }
1350
1351
1352 const gchar* tracker_sparql_variable_get_sql_expression (TrackerSparqlVariable* self) {
1353 const gchar* result;
1354 const gchar* _tmp0_;
1355 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1356 g_return_val_if_fail (self != NULL, NULL);
1357 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1358 _tmp0_ = self->priv->_sql_expression;
1359 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1360 result = _tmp0_;
1361 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1362 return result;
1363 #line 1364 "tracker-sparql-query.c"
1364 }
1365
1366
1367 static void tracker_sparql_variable_set_sql_expression (TrackerSparqlVariable* self, const gchar* value) {
1368 const gchar* _tmp0_;
1369 gchar* _tmp1_;
1370 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1371 g_return_if_fail (self != NULL);
1372 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1373 _tmp0_ = value;
1374 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1375 _tmp1_ = g_strdup (_tmp0_);
1376 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1377 _g_free0 (self->priv->_sql_expression);
1378 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1379 self->priv->_sql_expression = _tmp1_;
1380 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1381 g_object_notify ((GObject *) self, "sql-expression");
1382 #line 1383 "tracker-sparql-query.c"
1383 }
1384
1385
1386 static void tracker_sparql_variable_class_init (TrackerSparqlVariableClass * klass) {
1387 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1388 tracker_sparql_variable_parent_class = g_type_class_peek_parent (klass);
1389 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1390 g_type_class_add_private (klass, sizeof (TrackerSparqlVariablePrivate));
1391 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1392 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_variable_get_property;
1393 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1394 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_variable_set_property;
1395 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1396 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_variable_finalize;
1397 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1398 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_VARIABLE_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
1399 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1400 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_VARIABLE_INDEX, g_param_spec_int ("index", "index", "index", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
1401 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1402 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION, g_param_spec_string ("sql-expression", "sql-expression", "sql-expression", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
1403 #line 1404 "tracker-sparql-query.c"
1404 }
1405
1406
1407 static void tracker_sparql_variable_instance_init (TrackerSparqlVariable * self) {
1408 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1409 self->priv = TRACKER_SPARQL_VARIABLE_GET_PRIVATE (self);
1410 #line 1411 "tracker-sparql-query.c"
1411 }
1412
1413
1414 static void tracker_sparql_variable_finalize (GObject* obj) {
1415 TrackerSparqlVariable * self;
1416 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1417 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable);
1418 #line 75 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1419 _g_free0 (self->priv->_name);
1420 #line 77 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1421 _g_free0 (self->priv->_sql_expression);
1422 #line 78 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1423 _g_object_unref0 (self->binding);
1424 #line 79 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1425 _g_free0 (self->priv->sql_identifier);
1426 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1427 G_OBJECT_CLASS (tracker_sparql_variable_parent_class)->finalize (obj);
1428 #line 1429 "tracker-sparql-query.c"
1429 }
1430
1431
1432 GType tracker_sparql_variable_get_type (void) {
1433 static volatile gsize tracker_sparql_variable_type_id__volatile = 0;
1434 if (g_once_init_enter (&tracker_sparql_variable_type_id__volatile)) {
1435 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlVariableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_variable_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlVariable), 0, (GInstanceInitFunc) tracker_sparql_variable_instance_init, NULL };
1436 GType tracker_sparql_variable_type_id;
1437 tracker_sparql_variable_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlVariable", &g_define_type_info, 0);
1438 g_once_init_leave (&tracker_sparql_variable_type_id__volatile, tracker_sparql_variable_type_id);
1439 }
1440 return tracker_sparql_variable_type_id__volatile;
1441 }
1442
1443
1444 static void _vala_tracker_sparql_variable_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
1445 TrackerSparqlVariable * self;
1446 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable);
1447 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1448 switch (property_id) {
1449 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1450 case TRACKER_SPARQL_VARIABLE_NAME:
1451 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1452 g_value_set_string (value, tracker_sparql_variable_get_name (self));
1453 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1454 break;
1455 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1456 case TRACKER_SPARQL_VARIABLE_INDEX:
1457 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1458 g_value_set_int (value, tracker_sparql_variable_get_index (self));
1459 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1460 break;
1461 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1462 case TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION:
1463 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1464 g_value_set_string (value, tracker_sparql_variable_get_sql_expression (self));
1465 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1466 break;
1467 #line 1468 "tracker-sparql-query.c"
1468 default:
1469 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1470 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1471 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1472 break;
1473 #line 1474 "tracker-sparql-query.c"
1474 }
1475 }
1476
1477
1478 static void _vala_tracker_sparql_variable_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
1479 TrackerSparqlVariable * self;
1480 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_VARIABLE, TrackerSparqlVariable);
1481 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1482 switch (property_id) {
1483 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1484 case TRACKER_SPARQL_VARIABLE_NAME:
1485 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1486 tracker_sparql_variable_set_name (self, g_value_get_string (value));
1487 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1488 break;
1489 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1490 case TRACKER_SPARQL_VARIABLE_INDEX:
1491 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1492 tracker_sparql_variable_set_index (self, g_value_get_int (value));
1493 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1494 break;
1495 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1496 case TRACKER_SPARQL_VARIABLE_SQL_EXPRESSION:
1497 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1498 tracker_sparql_variable_set_sql_expression (self, g_value_get_string (value));
1499 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1500 break;
1501 #line 1502 "tracker-sparql-query.c"
1502 default:
1503 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1504 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
1505 #line 74 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1506 break;
1507 #line 1508 "tracker-sparql-query.c"
1508 }
1509 }
1510
1511
1512 static gpointer _tracker_sparql_context_ref0 (gpointer self) {
1513 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1514 return self ? tracker_sparql_context_ref (self) : NULL;
1515 #line 1516 "tracker-sparql-query.c"
1516 }
1517
1518
1519 static guint _tracker_sparql_variable_hash_ghash_func (gconstpointer key) {
1520 guint result;
1521 result = tracker_sparql_variable_hash (key);
(emitted by gcc) 1522 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1523 return result;
1524 #line 1525 "tracker-sparql-query.c"
1525 }
1526
1527
1528 static gboolean _tracker_sparql_variable_equal_gequal_func (gconstpointer a, gconstpointer b) {
1529 gboolean result;
1530 result = tracker_sparql_variable_equal (a, b);
(emitted by gcc) 1531 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1532 return result;
1533 #line 1534 "tracker-sparql-query.c"
1534 }
1535
1536
1537 static gpointer _g_hash_table_ref0 (gpointer self) {
1538 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1539 return self ? g_hash_table_ref (self) : NULL;
1540 #line 1541 "tracker-sparql-query.c"
1541 }
1542
1543
1544 TrackerSparqlContext* tracker_sparql_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
1545 TrackerSparqlContext* self = NULL;
1546 TrackerSparqlQuery* _tmp0_;
1547 TrackerSparqlContext* _tmp1_;
1548 TrackerSparqlContext* _tmp2_;
1549 GDestroyNotify _tmp3_;
1550 GHashTable* _tmp4_;
1551 TrackerSparqlContext* _tmp5_;
1552 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1553 g_return_val_if_fail (query != NULL, NULL);
1554 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1555 self = (TrackerSparqlContext*) g_type_create_instance (object_type);
1556 #line 119 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1557 _tmp0_ = query;
1558 #line 119 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1559 self->query = _tmp0_;
1560 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1561 _tmp1_ = parent_context;
1562 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1563 _tmp2_ = _tracker_sparql_context_ref0 (_tmp1_);
1564 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1565 _tracker_sparql_context_unref0 (self->parent_context);
1566 #line 120 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1567 self->parent_context = _tmp2_;
1568 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1569 _tmp3_ = g_object_unref;
1570 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1571 _tmp4_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp3_, NULL);
1572 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1573 _g_hash_table_unref0 (self->var_set);
1574 #line 121 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1575 self->var_set = _tmp4_;
1576 #line 123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1577 _tmp5_ = parent_context;
1578 #line 123 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1579 if (_tmp5_ == NULL) {
1580 #line 1581 "tracker-sparql-query.c"
1581 GDestroyNotify _tmp6_;
1582 GHashTable* _tmp7_;
1583 GHashFunc _tmp8_;
1584 GEqualFunc _tmp9_;
1585 GDestroyNotify _tmp10_;
1586 GDestroyNotify _tmp11_;
1587 GHashTable* _tmp12_;
1588 GDestroyNotify _tmp13_;
1589 GDestroyNotify _tmp14_;
1590 GHashTable* _tmp15_;
1591 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1592 _tmp6_ = g_object_unref;
1593 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1594 _tmp7_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp6_, NULL);
1595 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1596 _g_hash_table_unref0 (self->select_var_set);
1597 #line 124 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1598 self->select_var_set = _tmp7_;
1599 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1600 _tmp8_ = g_str_hash;
1601 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1602 _tmp9_ = g_str_equal;
1603 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1604 _tmp10_ = g_free;
1605 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1606 _tmp11_ = g_object_unref;
1607 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1608 _tmp12_ = g_hash_table_new_full (_tmp8_, _tmp9_, _tmp10_, _tmp11_);
1609 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1610 _g_hash_table_unref0 (self->var_map);
1611 #line 125 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1612 self->var_map = _tmp12_;
1613 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1614 _tmp13_ = g_object_unref;
1615 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1616 _tmp14_ = g_object_unref;
1617 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1618 _tmp15_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp13_, _tmp14_);
1619 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1620 _g_hash_table_unref0 (self->predicate_variable_map);
1621 #line 126 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1622 self->predicate_variable_map = _tmp15_;
1623 #line 1624 "tracker-sparql-query.c"
1624 } else {
1625 TrackerSparqlContext* _tmp16_;
1626 GHashTable* _tmp17_;
1627 GHashTable* _tmp18_;
1628 TrackerSparqlContext* _tmp19_;
1629 GHashTable* _tmp20_;
1630 GHashTable* _tmp21_;
1631 TrackerSparqlContext* _tmp22_;
1632 GHashTable* _tmp23_;
1633 GHashTable* _tmp24_;
1634 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1635 _tmp16_ = parent_context;
1636 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1637 _tmp17_ = _tmp16_->select_var_set;
1638 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1639 _tmp18_ = _g_hash_table_ref0 (_tmp17_);
1640 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1641 _g_hash_table_unref0 (self->select_var_set);
1642 #line 128 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1643 self->select_var_set = _tmp18_;
1644 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1645 _tmp19_ = parent_context;
1646 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1647 _tmp20_ = _tmp19_->var_map;
1648 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1649 _tmp21_ = _g_hash_table_ref0 (_tmp20_);
1650 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1651 _g_hash_table_unref0 (self->var_map);
1652 #line 129 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1653 self->var_map = _tmp21_;
1654 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1655 _tmp22_ = parent_context;
1656 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1657 _tmp23_ = _tmp22_->predicate_variable_map;
1658 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1659 _tmp24_ = _g_hash_table_ref0 (_tmp23_);
1660 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1661 _g_hash_table_unref0 (self->predicate_variable_map);
1662 #line 130 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1663 self->predicate_variable_map = _tmp24_;
1664 #line 1665 "tracker-sparql-query.c"
1665 }
1666 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1667 return self;
1668 #line 1669 "tracker-sparql-query.c"
1669 }
1670
1671
1672 TrackerSparqlContext* tracker_sparql_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
1673 #line 118 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1674 return tracker_sparql_context_construct (TRACKER_SPARQL_TYPE_CONTEXT, query, parent_context);
1675 #line 1676 "tracker-sparql-query.c"
1676 }
1677
1678
1679 TrackerSparqlContext* tracker_sparql_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
1680 TrackerSparqlContext* self = NULL;
1681 TrackerSparqlQuery* _tmp0_;
1682 TrackerSparqlContext* _tmp1_;
1683 TrackerSparqlContext* _tmp2_;
1684 GDestroyNotify _tmp3_;
1685 GHashTable* _tmp4_;
1686 GDestroyNotify _tmp5_;
1687 GHashTable* _tmp6_;
1688 TrackerSparqlContext* _tmp7_;
1689 GHashTable* _tmp8_;
1690 GHashTable* _tmp9_;
1691 GDestroyNotify _tmp10_;
1692 GDestroyNotify _tmp11_;
1693 GHashTable* _tmp12_;
1694 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1695 g_return_val_if_fail (query != NULL, NULL);
1696 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1697 g_return_val_if_fail (parent_context != NULL, NULL);
1698 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1699 self = (TrackerSparqlContext*) g_type_create_instance (object_type);
1700 #line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1701 _tmp0_ = query;
1702 #line 135 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1703 self->query = _tmp0_;
1704 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1705 _tmp1_ = parent_context;
1706 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1707 _tmp2_ = _tracker_sparql_context_ref0 (_tmp1_);
1708 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1709 _tracker_sparql_context_unref0 (self->parent_context);
1710 #line 136 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1711 self->parent_context = _tmp2_;
1712 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1713 _tmp3_ = g_object_unref;
1714 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1715 _tmp4_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp3_, NULL);
1716 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1717 _g_hash_table_unref0 (self->var_set);
1718 #line 137 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1719 self->var_set = _tmp4_;
1720 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1721 _tmp5_ = g_object_unref;
1722 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1723 _tmp6_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp5_, NULL);
1724 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1725 _g_hash_table_unref0 (self->select_var_set);
1726 #line 139 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1727 self->select_var_set = _tmp6_;
1728 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1729 _tmp7_ = parent_context;
1730 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1731 _tmp8_ = _tmp7_->var_map;
1732 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1733 _tmp9_ = _g_hash_table_ref0 (_tmp8_);
1734 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1735 _g_hash_table_unref0 (self->var_map);
1736 #line 140 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1737 self->var_map = _tmp9_;
1738 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1739 _tmp10_ = g_object_unref;
1740 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1741 _tmp11_ = g_object_unref;
1742 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1743 _tmp12_ = g_hash_table_new_full (_tracker_sparql_variable_hash_ghash_func, _tracker_sparql_variable_equal_gequal_func, _tmp10_, _tmp11_);
1744 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1745 _g_hash_table_unref0 (self->predicate_variable_map);
1746 #line 141 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1747 self->predicate_variable_map = _tmp12_;
1748 #line 142 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1749 self->scalar_subquery = TRUE;
1750 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1751 return self;
1752 #line 1753 "tracker-sparql-query.c"
1753 }
1754
1755
1756 TrackerSparqlContext* tracker_sparql_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
1757 #line 134 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1758 return tracker_sparql_context_construct_subquery (TRACKER_SPARQL_TYPE_CONTEXT, query, parent_context);
1759 #line 1760 "tracker-sparql-query.c"
1760 }
1761
1762
1763 static gpointer _g_object_ref0 (gpointer self) {
1764 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1765 return self ? g_object_ref (self) : NULL;
1766 #line 1767 "tracker-sparql-query.c"
1767 }
1768
1769
1770 TrackerSparqlVariable* tracker_sparql_context_get_variable (TrackerSparqlContext* self, const gchar* name) {
1771 TrackerSparqlVariable* result = NULL;
1772 GHashTable* _tmp0_;
1773 const gchar* _tmp1_;
1774 gconstpointer _tmp2_ = NULL;
1775 TrackerSparqlVariable* _result_;
1776 TrackerSparqlVariable* _tmp3_;
1777 TrackerSparqlVariable* _tmp16_;
1778 #line 145 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1779 g_return_val_if_fail (self != NULL, NULL);
1780 #line 145 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1781 g_return_val_if_fail (name != NULL, NULL);
1782 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1783 _tmp0_ = self->var_map;
1784 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1785 _tmp1_ = name;
1786 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1787 _tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
1788 #line 146 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1789 _result_ = (TrackerSparqlVariable*) _tmp2_;
1790 #line 147 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1791 _tmp3_ = _result_;
1792 #line 147 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1793 if (_tmp3_ == NULL) {
1794 #line 1795 "tracker-sparql-query.c"
1795 const gchar* _tmp4_;
1796 TrackerSparqlQuery* _tmp5_;
(emitted by gcc) 1797 TrackerSparqlQuery* _tmp6_;
1798 gint _tmp7_;
1799 gint _tmp8_;
1800 TrackerSparqlVariable* _tmp9_;
1801 TrackerSparqlVariable* variable;
1802 GHashTable* _tmp10_;
1803 const gchar* _tmp11_;
1804 gchar* _tmp12_;
1805 TrackerSparqlVariable* _tmp13_;
1806 TrackerSparqlVariable* _tmp14_;
1807 TrackerSparqlVariable* _tmp15_;
1808 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1809 _tmp4_ = name;
1810 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1811 _tmp5_ = self->query;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
1812 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1813 _tmp6_ = self->query;
1814 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1815 _tmp7_ = _tmp6_->last_var_index;
1816 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1817 _tmp6_->last_var_index = _tmp7_ + 1;
1818 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1819 _tmp8_ = _tmp6_->last_var_index;
1820 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1821 _tmp9_ = tracker_sparql_variable_new (_tmp4_, _tmp8_);
1822 #line 148 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1823 variable = _tmp9_;
1824 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1825 _tmp10_ = self->var_map;
1826 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1827 _tmp11_ = name;
1828 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1829 _tmp12_ = g_strdup (_tmp11_);
1830 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1831 _tmp13_ = variable;
1832 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1833 _tmp14_ = _g_object_ref0 (_tmp13_);
1834 #line 149 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1835 g_hash_table_insert (_tmp10_, _tmp12_, _tmp14_);
1836 #line 151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1837 _tmp15_ = variable;
1838 #line 151 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1839 _result_ = _tmp15_;
1840 #line 147 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1841 _g_object_unref0 (variable);
1842 #line 1843 "tracker-sparql-query.c"
1843 }
1844 #line 153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1845 _tmp16_ = _result_;
1846 #line 153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1847 result = _tmp16_;
1848 #line 153 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1849 return result;
1850 #line 1851 "tracker-sparql-query.c"
1851 }
1852
1853
1854 static void tracker_sparql_value_context_init (GValue* value) {
1855 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1856 value->data[0].v_pointer = NULL;
1857 #line 1858 "tracker-sparql-query.c"
1858 }
1859
1860
1861 static void tracker_sparql_value_context_free_value (GValue* value) {
1862 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1863 if (value->data[0].v_pointer) {
1864 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1865 tracker_sparql_context_unref (value->data[0].v_pointer);
1866 #line 1867 "tracker-sparql-query.c"
1867 }
1868 }
1869
1870
1871 static void tracker_sparql_value_context_copy_value (const GValue* src_value, GValue* dest_value) {
1872 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1873 if (src_value->data[0].v_pointer) {
1874 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1875 dest_value->data[0].v_pointer = tracker_sparql_context_ref (src_value->data[0].v_pointer);
1876 #line 1877 "tracker-sparql-query.c"
1877 } else {
1878 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1879 dest_value->data[0].v_pointer = NULL;
1880 #line 1881 "tracker-sparql-query.c"
1881 }
1882 }
1883
1884
1885 static gpointer tracker_sparql_value_context_peek_pointer (const GValue* value) {
1886 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1887 return value->data[0].v_pointer;
1888 #line 1889 "tracker-sparql-query.c"
1889 }
1890
1891
1892 static gchar* tracker_sparql_value_context_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
1893 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1894 if (collect_values[0].v_pointer) {
1895 #line 1896 "tracker-sparql-query.c"
1896 TrackerSparqlContext* object;
1897 object = collect_values[0].v_pointer;
1898 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1899 if (object->parent_instance.g_class == NULL) {
1900 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1901 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
1902 #line 1903 "tracker-sparql-query.c"
1903 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
1904 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1905 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
1906 #line 1907 "tracker-sparql-query.c"
1907 }
1908 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1909 value->data[0].v_pointer = tracker_sparql_context_ref (object);
1910 #line 1911 "tracker-sparql-query.c"
1911 } else {
1912 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1913 value->data[0].v_pointer = NULL;
1914 #line 1915 "tracker-sparql-query.c"
1915 }
1916 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1917 return NULL;
1918 #line 1919 "tracker-sparql-query.c"
1919 }
1920
1921
1922 static gchar* tracker_sparql_value_context_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
1923 TrackerSparqlContext** object_p;
1924 object_p = collect_values[0].v_pointer;
1925 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1926 if (!object_p) {
1927 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1928 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
1929 #line 1930 "tracker-sparql-query.c"
1930 }
1931 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1932 if (!value->data[0].v_pointer) {
1933 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1934 *object_p = NULL;
1935 #line 1936 "tracker-sparql-query.c"
1936 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
1937 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1938 *object_p = value->data[0].v_pointer;
1939 #line 1940 "tracker-sparql-query.c"
1940 } else {
1941 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1942 *object_p = tracker_sparql_context_ref (value->data[0].v_pointer);
1943 #line 1944 "tracker-sparql-query.c"
1944 }
1945 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1946 return NULL;
1947 #line 1948 "tracker-sparql-query.c"
1948 }
1949
1950
1951 GParamSpec* tracker_sparql_param_spec_context (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
1952 TrackerSparqlParamSpecContext* spec;
1953 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1954 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_SPARQL_TYPE_CONTEXT), NULL);
1955 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1956 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
1957 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1958 G_PARAM_SPEC (spec)->value_type = object_type;
1959 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1960 return G_PARAM_SPEC (spec);
1961 #line 1962 "tracker-sparql-query.c"
1962 }
1963
1964
1965 gpointer tracker_sparql_value_get_context (const GValue* value) {
1966 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1967 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_CONTEXT), NULL);
1968 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1969 return value->data[0].v_pointer;
1970 #line 1971 "tracker-sparql-query.c"
1971 }
1972
1973
1974 void tracker_sparql_value_set_context (GValue* value, gpointer v_object) {
1975 TrackerSparqlContext* old;
1976 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1977 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_CONTEXT));
1978 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1979 old = value->data[0].v_pointer;
1980 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1981 if (v_object) {
1982 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1983 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_CONTEXT));
1984 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1985 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
1986 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1987 value->data[0].v_pointer = v_object;
1988 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1989 tracker_sparql_context_ref (value->data[0].v_pointer);
1990 #line 1991 "tracker-sparql-query.c"
1991 } else {
1992 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1993 value->data[0].v_pointer = NULL;
1994 #line 1995 "tracker-sparql-query.c"
1995 }
1996 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1997 if (old) {
1998 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
1999 tracker_sparql_context_unref (old);
2000 #line 2001 "tracker-sparql-query.c"
2001 }
2002 }
2003
2004
2005 void tracker_sparql_value_take_context (GValue* value, gpointer v_object) {
2006 TrackerSparqlContext* old;
2007 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2008 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_CONTEXT));
2009 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2010 old = value->data[0].v_pointer;
2011 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2012 if (v_object) {
2013 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2014 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_CONTEXT));
2015 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2016 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2017 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2018 value->data[0].v_pointer = v_object;
2019 #line 2020 "tracker-sparql-query.c"
2020 } else {
2021 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2022 value->data[0].v_pointer = NULL;
2023 #line 2024 "tracker-sparql-query.c"
2024 }
2025 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2026 if (old) {
2027 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2028 tracker_sparql_context_unref (old);
2029 #line 2030 "tracker-sparql-query.c"
2030 }
2031 }
2032
2033
2034 static void tracker_sparql_context_class_init (TrackerSparqlContextClass * klass) {
2035 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2036 tracker_sparql_context_parent_class = g_type_class_peek_parent (klass);
2037 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2038 TRACKER_SPARQL_CONTEXT_CLASS (klass)->finalize = tracker_sparql_context_finalize;
2039 #line 2040 "tracker-sparql-query.c"
2040 }
2041
2042
2043 static void tracker_sparql_context_instance_init (TrackerSparqlContext * self) {
2044 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2045 self->ref_count = 1;
2046 #line 2047 "tracker-sparql-query.c"
2047 }
2048
2049
2050 static void tracker_sparql_context_finalize (TrackerSparqlContext* obj) {
2051 TrackerSparqlContext * self;
2052 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2053 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_CONTEXT, TrackerSparqlContext);
2054 #line 104 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2055 _tracker_sparql_context_unref0 (self->parent_context);
2056 #line 107 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2057 _g_hash_table_unref0 (self->var_set);
2058 #line 109 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2059 _g_hash_table_unref0 (self->var_map);
2060 #line 111 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2061 _g_hash_table_unref0 (self->select_var_set);
2062 #line 114 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2063 _g_hash_table_unref0 (self->predicate_variable_map);
2064 #line 2065 "tracker-sparql-query.c"
2065 }
2066
2067
2068 GType tracker_sparql_context_get_type (void) {
2069 static volatile gsize tracker_sparql_context_type_id__volatile = 0;
2070 if (g_once_init_enter (&tracker_sparql_context_type_id__volatile)) {
2071 static const GTypeValueTable g_define_type_value_table = { tracker_sparql_value_context_init, tracker_sparql_value_context_free_value, tracker_sparql_value_context_copy_value, tracker_sparql_value_context_peek_pointer, "p", tracker_sparql_value_context_collect_value, "p", tracker_sparql_value_context_lcopy_value };
2072 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlContext), 0, (GInstanceInitFunc) tracker_sparql_context_instance_init, &g_define_type_value_table };
2073 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
2074 GType tracker_sparql_context_type_id;
2075 tracker_sparql_context_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerSparqlContext", &g_define_type_info, &g_define_type_fundamental_info, 0);
2076 g_once_init_leave (&tracker_sparql_context_type_id__volatile, tracker_sparql_context_type_id);
2077 }
2078 return tracker_sparql_context_type_id__volatile;
2079 }
2080
2081
2082 gpointer tracker_sparql_context_ref (gpointer instance) {
2083 TrackerSparqlContext* self;
2084 self = instance;
2085 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2086 g_atomic_int_inc (&self->ref_count);
2087 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2088 return instance;
2089 #line 2090 "tracker-sparql-query.c"
2090 }
2091
2092
2093 void tracker_sparql_context_unref (gpointer instance) {
2094 TrackerSparqlContext* self;
2095 self = instance;
2096 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2097 if (g_atomic_int_dec_and_test (&self->ref_count)) {
2098 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2099 TRACKER_SPARQL_CONTEXT_GET_CLASS (self)->finalize (self);
2100 #line 101 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2101 g_type_free_instance ((GTypeInstance *) self);
2102 #line 2103 "tracker-sparql-query.c"
2103 }
2104 }
2105
2106
2107 TrackerSparqlSelectContext* tracker_sparql_select_context_construct (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
2108 TrackerSparqlSelectContext* self = NULL;
2109 TrackerSparqlQuery* _tmp0_;
2110 TrackerSparqlContext* _tmp1_;
2111 #line 162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2112 g_return_val_if_fail (query != NULL, NULL);
2113 #line 163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2114 _tmp0_ = query;
2115 #line 163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2116 _tmp1_ = parent_context;
2117 #line 163 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2118 self = (TrackerSparqlSelectContext*) tracker_sparql_context_construct (object_type, _tmp0_, _tmp1_);
2119 #line 162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2120 return self;
2121 #line 2122 "tracker-sparql-query.c"
2122 }
2123
2124
2125 TrackerSparqlSelectContext* tracker_sparql_select_context_new (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
2126 #line 162 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2127 return tracker_sparql_select_context_construct (TRACKER_SPARQL_TYPE_SELECT_CONTEXT, query, parent_context);
2128 #line 2129 "tracker-sparql-query.c"
2129 }
2130
2131
2132 TrackerSparqlSelectContext* tracker_sparql_select_context_construct_subquery (GType object_type, TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
2133 TrackerSparqlSelectContext* self = NULL;
2134 TrackerSparqlQuery* _tmp0_;
2135 TrackerSparqlContext* _tmp1_;
2136 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2137 g_return_val_if_fail (query != NULL, NULL);
2138 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2139 g_return_val_if_fail (parent_context != NULL, NULL);
2140 #line 167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2141 _tmp0_ = query;
2142 #line 167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2143 _tmp1_ = parent_context;
2144 #line 167 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2145 self = (TrackerSparqlSelectContext*) tracker_sparql_context_construct_subquery (object_type, _tmp0_, _tmp1_);
2146 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2147 return self;
2148 #line 2149 "tracker-sparql-query.c"
2149 }
2150
2151
2152 TrackerSparqlSelectContext* tracker_sparql_select_context_new_subquery (TrackerSparqlQuery* query, TrackerSparqlContext* parent_context) {
2153 #line 166 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2154 return tracker_sparql_select_context_construct_subquery (TRACKER_SPARQL_TYPE_SELECT_CONTEXT, query, parent_context);
2155 #line 2156 "tracker-sparql-query.c"
2156 }
2157
2158
2159 static void tracker_sparql_select_context_class_init (TrackerSparqlSelectContextClass * klass) {
2160 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2161 tracker_sparql_select_context_parent_class = g_type_class_peek_parent (klass);
2162 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2163 TRACKER_SPARQL_CONTEXT_CLASS (klass)->finalize = tracker_sparql_select_context_finalize;
2164 #line 2165 "tracker-sparql-query.c"
2165 }
2166
2167
2168 static void tracker_sparql_select_context_instance_init (TrackerSparqlSelectContext * self) {
2169 TrackerPropertyType* _tmp0_ = NULL;
2170 gchar** _tmp1_ = NULL;
2171 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2172 _tmp0_ = g_new0 (TrackerPropertyType, 0);
2173 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2174 self->types = _tmp0_;
2175 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2176 self->types_length1 = 0;
2177 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2178 self->_types_size_ = self->types_length1;
2179 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2180 _tmp1_ = g_new0 (gchar*, 0 + 1);
2181 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2182 self->variable_names = _tmp1_;
2183 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2184 self->variable_names_length1 = 0;
2185 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2186 self->_variable_names_size_ = self->variable_names_length1;
2187 #line 2188 "tracker-sparql-query.c"
2188 }
2189
2190
2191 static void tracker_sparql_select_context_finalize (TrackerSparqlContext* obj) {
2192 TrackerSparqlSelectContext * self;
2193 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2194 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_SELECT_CONTEXT, TrackerSparqlSelectContext);
2195 #line 159 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2196 self->types = (g_free (self->types), NULL);
2197 #line 160 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2198 self->variable_names = (_vala_array_free (self->variable_names, self->variable_names_length1, (GDestroyNotify) g_free), NULL);
2199 #line 157 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2200 TRACKER_SPARQL_CONTEXT_CLASS (tracker_sparql_select_context_parent_class)->finalize (obj);
2201 #line 2202 "tracker-sparql-query.c"
2202 }
2203
2204
2205 GType tracker_sparql_select_context_get_type (void) {
2206 static volatile gsize tracker_sparql_select_context_type_id__volatile = 0;
2207 if (g_once_init_enter (&tracker_sparql_select_context_type_id__volatile)) {
2208 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlSelectContextClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_select_context_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlSelectContext), 0, (GInstanceInitFunc) tracker_sparql_select_context_instance_init, NULL };
2209 GType tracker_sparql_select_context_type_id;
2210 tracker_sparql_select_context_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CONTEXT, "TrackerSparqlSelectContext", &g_define_type_info, 0);
2211 g_once_init_leave (&tracker_sparql_select_context_type_id__volatile, tracker_sparql_select_context_type_id);
2212 }
2213 return tracker_sparql_select_context_type_id__volatile;
2214 }
2215
2216
2217 static void _g_free0_ (gpointer var) {
2218 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2219 var = (g_free (var), NULL);
2220 #line 2221 "tracker-sparql-query.c"
2221 }
2222
2223
2224 TrackerSparqlSolution* tracker_sparql_solution_construct (GType object_type) {
2225 TrackerSparqlSolution* self = NULL;
2226 GHashFunc _tmp0_;
2227 GEqualFunc _tmp1_;
2228 GHashTable* _tmp2_;
2229 GPtrArray* _tmp3_;
2230 #line 176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2231 self = (TrackerSparqlSolution*) g_type_create_instance (object_type);
2232 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2233 _tmp0_ = g_str_hash;
2234 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2235 _tmp1_ = g_str_equal;
2236 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2237 _tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, NULL);
2238 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2239 _g_hash_table_unref0 (self->hash);
2240 #line 177 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2241 self->hash = _tmp2_;
2242 #line 178 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2243 _tmp3_ = g_ptr_array_new_with_free_func (_g_free0_);
2244 #line 178 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2245 _g_ptr_array_unref0 (self->values);
2246 #line 178 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2247 self->values = _tmp3_;
2248 #line 176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2249 return self;
2250 #line 2251 "tracker-sparql-query.c"
2251 }
2252
2253
2254 TrackerSparqlSolution* tracker_sparql_solution_new (void) {
2255 #line 176 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2256 return tracker_sparql_solution_construct (TRACKER_SPARQL_TYPE_SOLUTION);
2257 #line 2258 "tracker-sparql-query.c"
2258 }
2259
2260
2261 gchar* tracker_sparql_solution_lookup (TrackerSparqlSolution* self, const gchar* variable_name) {
2262 gchar* result = NULL;
2263 gint variable_index = 0;
2264 GHashTable* _tmp0_;
2265 const gchar* _tmp1_;
2266 gconstpointer _tmp2_ = NULL;
2267 gboolean _tmp3_ = FALSE;
2268 GPtrArray* _tmp4_;
2269 gint _tmp5_;
2270 GHashTable* _tmp6_;
2271 guint _tmp7_ = 0U;
2272 gint _tmp8_;
2273 gconstpointer _tmp9_ = NULL;
2274 gchar* _tmp10_;
2275 #line 181 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2276 g_return_val_if_fail (self != NULL, NULL);
2277 #line 181 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2278 g_return_val_if_fail (variable_name != NULL, NULL);
2279 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2280 _tmp0_ = self->hash;
2281 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2282 _tmp1_ = variable_name;
2283 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2284 _tmp3_ = g_hash_table_lookup_extended (_tmp0_, _tmp1_, NULL, &_tmp2_);
2285 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2286 variable_index = _tmp2_;
2287 #line 183 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2288 if (!_tmp3_) {
2289 #line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2290 result = NULL;
2291 #line 184 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2292 return result;
2293 #line 2294 "tracker-sparql-query.c"
2294 }
2295 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2296 _tmp4_ = self->values;
2297 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2298 _tmp5_ = self->solution_index;
2299 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2300 _tmp6_ = self->hash;
2301 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2302 _tmp7_ = g_hash_table_size (_tmp6_);
2303 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2304 _tmp8_ = variable_index;
2305 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2306 _tmp9_ = g_ptr_array_index (_tmp4_, (_tmp5_ * _tmp7_) + _tmp8_);
2307 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2308 _tmp10_ = g_strdup ((const gchar*) _tmp9_);
2309 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2310 result = _tmp10_;
2311 #line 186 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2312 return result;
2313 #line 2314 "tracker-sparql-query.c"
2314 }
2315
2316
2317 static void tracker_sparql_value_solution_init (GValue* value) {
2318 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2319 value->data[0].v_pointer = NULL;
2320 #line 2321 "tracker-sparql-query.c"
2321 }
2322
2323
2324 static void tracker_sparql_value_solution_free_value (GValue* value) {
2325 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2326 if (value->data[0].v_pointer) {
2327 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2328 tracker_sparql_solution_unref (value->data[0].v_pointer);
2329 #line 2330 "tracker-sparql-query.c"
2330 }
2331 }
2332
2333
2334 static void tracker_sparql_value_solution_copy_value (const GValue* src_value, GValue* dest_value) {
2335 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2336 if (src_value->data[0].v_pointer) {
2337 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2338 dest_value->data[0].v_pointer = tracker_sparql_solution_ref (src_value->data[0].v_pointer);
2339 #line 2340 "tracker-sparql-query.c"
2340 } else {
2341 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2342 dest_value->data[0].v_pointer = NULL;
2343 #line 2344 "tracker-sparql-query.c"
2344 }
2345 }
2346
2347
2348 static gpointer tracker_sparql_value_solution_peek_pointer (const GValue* value) {
2349 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2350 return value->data[0].v_pointer;
2351 #line 2352 "tracker-sparql-query.c"
2352 }
2353
2354
2355 static gchar* tracker_sparql_value_solution_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
2356 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2357 if (collect_values[0].v_pointer) {
2358 #line 2359 "tracker-sparql-query.c"
2359 TrackerSparqlSolution* object;
2360 object = collect_values[0].v_pointer;
2361 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2362 if (object->parent_instance.g_class == NULL) {
2363 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2364 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
2365 #line 2366 "tracker-sparql-query.c"
2366 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
2367 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2368 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
2369 #line 2370 "tracker-sparql-query.c"
2370 }
2371 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2372 value->data[0].v_pointer = tracker_sparql_solution_ref (object);
2373 #line 2374 "tracker-sparql-query.c"
2374 } else {
2375 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2376 value->data[0].v_pointer = NULL;
2377 #line 2378 "tracker-sparql-query.c"
2378 }
2379 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2380 return NULL;
2381 #line 2382 "tracker-sparql-query.c"
2382 }
2383
2384
2385 static gchar* tracker_sparql_value_solution_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
2386 TrackerSparqlSolution** object_p;
2387 object_p = collect_values[0].v_pointer;
2388 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2389 if (!object_p) {
2390 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2391 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
2392 #line 2393 "tracker-sparql-query.c"
2393 }
2394 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2395 if (!value->data[0].v_pointer) {
2396 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2397 *object_p = NULL;
2398 #line 2399 "tracker-sparql-query.c"
2399 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
2400 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2401 *object_p = value->data[0].v_pointer;
2402 #line 2403 "tracker-sparql-query.c"
2403 } else {
2404 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2405 *object_p = tracker_sparql_solution_ref (value->data[0].v_pointer);
2406 #line 2407 "tracker-sparql-query.c"
2407 }
2408 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2409 return NULL;
2410 #line 2411 "tracker-sparql-query.c"
2411 }
2412
2413
2414 GParamSpec* tracker_sparql_param_spec_solution (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
2415 TrackerSparqlParamSpecSolution* spec;
2416 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2417 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_SPARQL_TYPE_SOLUTION), NULL);
2418 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2419 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
2420 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2421 G_PARAM_SPEC (spec)->value_type = object_type;
2422 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2423 return G_PARAM_SPEC (spec);
2424 #line 2425 "tracker-sparql-query.c"
2425 }
2426
2427
2428 gpointer tracker_sparql_value_get_solution (const GValue* value) {
2429 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2430 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_SOLUTION), NULL);
2431 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2432 return value->data[0].v_pointer;
2433 #line 2434 "tracker-sparql-query.c"
2434 }
2435
2436
2437 void tracker_sparql_value_set_solution (GValue* value, gpointer v_object) {
2438 TrackerSparqlSolution* old;
2439 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2440 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_SOLUTION));
2441 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2442 old = value->data[0].v_pointer;
2443 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2444 if (v_object) {
2445 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2446 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_SOLUTION));
2447 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2448 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2449 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2450 value->data[0].v_pointer = v_object;
2451 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2452 tracker_sparql_solution_ref (value->data[0].v_pointer);
2453 #line 2454 "tracker-sparql-query.c"
2454 } else {
2455 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2456 value->data[0].v_pointer = NULL;
2457 #line 2458 "tracker-sparql-query.c"
2458 }
2459 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2460 if (old) {
2461 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2462 tracker_sparql_solution_unref (old);
2463 #line 2464 "tracker-sparql-query.c"
2464 }
2465 }
2466
2467
2468 void tracker_sparql_value_take_solution (GValue* value, gpointer v_object) {
2469 TrackerSparqlSolution* old;
2470 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2471 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_SPARQL_TYPE_SOLUTION));
2472 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2473 old = value->data[0].v_pointer;
2474 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2475 if (v_object) {
2476 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2477 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_SPARQL_TYPE_SOLUTION));
2478 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2479 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
2480 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2481 value->data[0].v_pointer = v_object;
2482 #line 2483 "tracker-sparql-query.c"
2483 } else {
2484 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2485 value->data[0].v_pointer = NULL;
2486 #line 2487 "tracker-sparql-query.c"
2487 }
2488 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2489 if (old) {
2490 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2491 tracker_sparql_solution_unref (old);
2492 #line 2493 "tracker-sparql-query.c"
2493 }
2494 }
2495
2496
2497 static void tracker_sparql_solution_class_init (TrackerSparqlSolutionClass * klass) {
2498 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2499 tracker_sparql_solution_parent_class = g_type_class_peek_parent (klass);
2500 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2501 TRACKER_SPARQL_SOLUTION_CLASS (klass)->finalize = tracker_sparql_solution_finalize;
2502 #line 2503 "tracker-sparql-query.c"
2503 }
2504
2505
2506 static void tracker_sparql_solution_instance_init (TrackerSparqlSolution * self) {
2507 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2508 self->ref_count = 1;
2509 #line 2510 "tracker-sparql-query.c"
2510 }
2511
2512
2513 static void tracker_sparql_solution_finalize (TrackerSparqlSolution* obj) {
2514 TrackerSparqlSolution * self;
2515 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2516 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_SOLUTION, TrackerSparqlSolution);
2517 #line 172 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2518 _g_hash_table_unref0 (self->hash);
2519 #line 173 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2520 _g_ptr_array_unref0 (self->values);
2521 #line 2522 "tracker-sparql-query.c"
2522 }
2523
2524
2525 GType tracker_sparql_solution_get_type (void) {
2526 static volatile gsize tracker_sparql_solution_type_id__volatile = 0;
2527 if (g_once_init_enter (&tracker_sparql_solution_type_id__volatile)) {
2528 static const GTypeValueTable g_define_type_value_table = { tracker_sparql_value_solution_init, tracker_sparql_value_solution_free_value, tracker_sparql_value_solution_copy_value, tracker_sparql_value_solution_peek_pointer, "p", tracker_sparql_value_solution_collect_value, "p", tracker_sparql_value_solution_lcopy_value };
2529 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlSolutionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_solution_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlSolution), 0, (GInstanceInitFunc) tracker_sparql_solution_instance_init, &g_define_type_value_table };
2530 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
2531 GType tracker_sparql_solution_type_id;
2532 tracker_sparql_solution_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerSparqlSolution", &g_define_type_info, &g_define_type_fundamental_info, 0);
2533 g_once_init_leave (&tracker_sparql_solution_type_id__volatile, tracker_sparql_solution_type_id);
2534 }
2535 return tracker_sparql_solution_type_id__volatile;
2536 }
2537
2538
2539 gpointer tracker_sparql_solution_ref (gpointer instance) {
2540 TrackerSparqlSolution* self;
2541 self = instance;
2542 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2543 g_atomic_int_inc (&self->ref_count);
2544 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2545 return instance;
2546 #line 2547 "tracker-sparql-query.c"
2547 }
2548
2549
2550 void tracker_sparql_solution_unref (gpointer instance) {
2551 TrackerSparqlSolution* self;
2552 self = instance;
2553 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2554 if (g_atomic_int_dec_and_test (&self->ref_count)) {
2555 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2556 TRACKER_SPARQL_SOLUTION_GET_CLASS (self)->finalize (self);
2557 #line 171 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2558 g_type_free_instance ((GTypeInstance *) self);
2559 #line 2560 "tracker-sparql-query.c"
2560 }
2561 }
2562
2563
2564 TrackerSparqlQuery* tracker_sparql_query_construct (GType object_type, const gchar* query) {
2565 TrackerSparqlQuery * self = NULL;
2566 TrackerSparqlQueryTokenInfo* _tmp0_ = NULL;
2567 GHashFunc _tmp1_;
2568 GEqualFunc _tmp2_;
2569 GDestroyNotify _tmp3_;
2570 GDestroyNotify _tmp4_;
2571 GHashTable* _tmp5_;
2572 guchar* _tmp6_ = NULL;
2573 guchar* _tmp7_;
2574 gint _tmp7__length1;
(emitted by gcc) 2575 const gchar* _tmp8_;
2576 gchar* _tmp9_;
2577 TrackerSparqlExpression* _tmp10_;
2578 TrackerSparqlPattern* _tmp11_;
2579 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2580 g_return_val_if_fail (query != NULL, NULL);
2581 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2582 self = (TrackerSparqlQuery*) g_object_new (object_type, NULL);
2583 #line 247 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2584 tracker_sparql_query_set_no_cache (self, FALSE);
2585 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2586 _tmp0_ = g_new0 (TrackerSparqlQueryTokenInfo, TRACKER_SPARQL_QUERY_BUFFER_SIZE);
2587 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2588 self->priv->tokens = (g_free (self->priv->tokens), NULL);
2589 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2590 self->priv->tokens = _tmp0_;
2591 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2592 self->priv->tokens_length1 = TRACKER_SPARQL_QUERY_BUFFER_SIZE;
2593 #line 248 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2594 self->priv->_tokens_size_ = self->priv->tokens_length1;
2595 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2596 _tmp1_ = g_str_hash;
2597 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2598 _tmp2_ = g_str_equal;
2599 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2600 _tmp3_ = g_free;
2601 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2602 _tmp4_ = g_free;
2603 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2604 _tmp5_ = g_hash_table_new_full (_tmp1_, _tmp2_, _tmp3_, _tmp4_);
2605 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2606 _g_hash_table_unref0 (self->priv->prefix_map);
2607 #line 249 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2608 self->priv->prefix_map = _tmp5_;
2609 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2610 _tmp6_ = g_new0 (guchar, 16);
2611 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2612 self->priv->base_uuid = (g_free (self->priv->base_uuid), NULL);
2613 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2614 self->priv->base_uuid = _tmp6_;
2615 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2616 self->priv->base_uuid_length1 = 16;
2617 #line 251 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2618 self->priv->_base_uuid_size_ = self->priv->base_uuid_length1;
2619 #line 252 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2620 _tmp7_ = self->priv->base_uuid;
2621 #line 252 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2622 _tmp7__length1 = self->priv->base_uuid_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2623 #line 252 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2624 uuid_generate (_tmp7_);
2625 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2626 _tmp8_ = query;
2627 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2628 _tmp9_ = g_strdup (_tmp8_);
2629 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2630 _g_free0 (self->priv->query_string);
2631 #line 254 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2632 self->priv->query_string = _tmp9_;
2633 #line 256 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2634 _tmp10_ = tracker_sparql_expression_new (self);
2635 #line 256 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2636 _g_object_unref0 (self->expression);
2637 #line 256 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2638 self->expression = _tmp10_;
2639 #line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2640 _tmp11_ = tracker_sparql_pattern_new (self);
2641 #line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2642 _g_object_unref0 (self->pattern);
2643 #line 257 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2644 self->pattern = _tmp11_;
2645 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2646 return self;
2647 #line 2648 "tracker-sparql-query.c"
2648 }
2649
2650
2651 TrackerSparqlQuery* tracker_sparql_query_new (const gchar* query) {
2652 #line 246 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2653 return tracker_sparql_query_construct (TRACKER_SPARQL_TYPE_QUERY, query);
2654 #line 2655 "tracker-sparql-query.c"
2655 }
2656
2657
2658 TrackerSparqlQuery* tracker_sparql_query_construct_update (GType object_type, const gchar* query) {
2659 TrackerSparqlQuery * self = NULL;
2660 const gchar* _tmp0_;
2661 #line 260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2662 g_return_val_if_fail (query != NULL, NULL);
2663 #line 261 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2664 _tmp0_ = query;
2665 #line 261 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2666 self = (TrackerSparqlQuery*) tracker_sparql_query_construct (object_type, _tmp0_);
2667 #line 262 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2668 self->priv->update_extensions = TRUE;
2669 #line 260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2670 return self;
2671 #line 2672 "tracker-sparql-query.c"
2672 }
2673
2674
2675 TrackerSparqlQuery* tracker_sparql_query_new_update (const gchar* query) {
2676 #line 260 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2677 return tracker_sparql_query_construct_update (TRACKER_SPARQL_TYPE_QUERY, query);
2678 #line 2679 "tracker-sparql-query.c"
2679 }
2680
2681
2682 static glong string_strnlen (gchar* str, glong maxlen) {
2683 glong result = 0L;
2684 gchar* _tmp0_;
2685 glong _tmp1_;
2686 gchar* _tmp2_ = NULL;
2687 gchar* end;
2688 gchar* _tmp3_;
2689 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2690 _tmp0_ = str;
2691 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2692 _tmp1_ = maxlen;
2693 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2694 _tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
2695 #line 1147 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2696 end = _tmp2_;
2697 #line 1148 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2698 _tmp3_ = end;
2699 #line 1148 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2700 if (_tmp3_ == NULL) {
2701 #line 2702 "tracker-sparql-query.c"
2702 glong _tmp4_;
2703 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2704 _tmp4_ = maxlen;
2705 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2706 result = _tmp4_;
2707 #line 1149 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2708 return result;
2709 #line 2710 "tracker-sparql-query.c"
2710 } else {
2711 gchar* _tmp5_;
2712 gchar* _tmp6_;
2713 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2714 _tmp5_ = end;
2715 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2716 _tmp6_ = str;
2717 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2718 result = (glong) (_tmp5_ - _tmp6_);
2719 #line 1151 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2720 return result;
2721 #line 2722 "tracker-sparql-query.c"
2722 }
2723 }
2724
2725
2726 static gchar* string_substring (const gchar* self, glong offset, glong len) {
2727 gchar* result = NULL;
2728 glong string_length = 0L;
2729 gboolean _tmp0_ = FALSE;
2730 glong _tmp1_;
2731 gboolean _tmp3_;
2732 glong _tmp9_;
2733 glong _tmp15_;
2734 glong _tmp18_;
2735 glong _tmp19_;
2736 glong _tmp20_;
2737 glong _tmp21_;
2738 glong _tmp22_;
2739 gchar* _tmp23_ = NULL;
2740 #line 1158 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2741 g_return_val_if_fail (self != NULL, NULL);
2742 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2743 _tmp1_ = offset;
2744 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2745 if (_tmp1_ >= ((glong) 0)) {
2746 #line 2747 "tracker-sparql-query.c"
2747 glong _tmp2_;
2748 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2749 _tmp2_ = len;
2750 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2751 _tmp0_ = _tmp2_ >= ((glong) 0);
2752 #line 2753 "tracker-sparql-query.c"
2753 } else {
2754 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2755 _tmp0_ = FALSE;
2756 #line 2757 "tracker-sparql-query.c"
2757 }
2758 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2759 _tmp3_ = _tmp0_;
2760 #line 1160 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2761 if (_tmp3_) {
2762 #line 2763 "tracker-sparql-query.c"
2763 glong _tmp4_;
2764 glong _tmp5_;
2765 glong _tmp6_ = 0L;
2766 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2767 _tmp4_ = offset;
2768 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2769 _tmp5_ = len;
2770 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2771 _tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
2772 #line 1162 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2773 string_length = _tmp6_;
2774 #line 2775 "tracker-sparql-query.c"
2775 } else {
2776 gint _tmp7_;
2777 gint _tmp8_;
2778 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2779 _tmp7_ = strlen (self);
2780 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2781 _tmp8_ = _tmp7_;
2782 #line 1164 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2783 string_length = (glong) _tmp8_;
2784 #line 2785 "tracker-sparql-query.c"
2785 }
2786 #line 1167 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2787 _tmp9_ = offset;
2788 #line 1167 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2789 if (_tmp9_ < ((glong) 0)) {
2790 #line 2791 "tracker-sparql-query.c"
2791 glong _tmp10_;
2792 glong _tmp11_;
2793 glong _tmp12_;
2794 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2795 _tmp10_ = string_length;
2796 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2797 _tmp11_ = offset;
2798 #line 1168 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2799 offset = _tmp10_ + _tmp11_;
2800 #line 1169 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2801 _tmp12_ = offset;
2802 #line 1169 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2803 g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
2804 #line 2805 "tracker-sparql-query.c"
2805 } else {
2806 glong _tmp13_;
2807 glong _tmp14_;
2808 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2809 _tmp13_ = offset;
2810 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2811 _tmp14_ = string_length;
2812 #line 1171 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2813 g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
2814 #line 2815 "tracker-sparql-query.c"
2815 }
2816 #line 1173 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2817 _tmp15_ = len;
2818 #line 1173 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2819 if (_tmp15_ < ((glong) 0)) {
2820 #line 2821 "tracker-sparql-query.c"
2821 glong _tmp16_;
2822 glong _tmp17_;
2823 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2824 _tmp16_ = string_length;
2825 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2826 _tmp17_ = offset;
2827 #line 1174 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2828 len = _tmp16_ - _tmp17_;
2829 #line 2830 "tracker-sparql-query.c"
2830 }
2831 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2832 _tmp18_ = offset;
2833 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2834 _tmp19_ = len;
2835 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2836 _tmp20_ = string_length;
2837 #line 1176 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2838 g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
2839 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2840 _tmp21_ = offset;
2841 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2842 _tmp22_ = len;
2843 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2844 _tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
2845 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2846 result = _tmp23_;
2847 #line 1177 "/usr/share/vala-0.18/vapi/glib-2.0.vapi"
2848 return result;
2849 #line 2850 "tracker-sparql-query.c"
2850 }
2851
2852
2853 static gchar* tracker_sparql_query_get_uuid_for_name (TrackerSparqlQuery* self, guchar* base_uuid, int base_uuid_length1, const gchar* name) {
2854 gchar* result = NULL;
2855 GChecksum* _tmp0_;
2856 GChecksum* checksum;
2857 guchar* _tmp1_;
2858 gint _tmp1__length1;
(emitted by gcc) 2859 const gchar* _tmp2_;
2860 const gchar* _tmp3_ = NULL;
2861 gchar* _tmp4_;
2862 gchar* sha1;
2863 gchar* _tmp5_ = NULL;
2864 gchar* _tmp6_;
2865 gchar* _tmp7_ = NULL;
2866 gchar* _tmp8_;
2867 gchar* _tmp9_ = NULL;
2868 gchar* _tmp10_;
2869 gchar* _tmp11_ = NULL;
2870 gchar* _tmp12_;
2871 gchar* _tmp13_ = NULL;
2872 gchar* _tmp14_;
2873 #line 265 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2874 g_return_val_if_fail (self != NULL, NULL);
2875 #line 265 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2876 g_return_val_if_fail (name != NULL, NULL);
2877 #line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2878 _tmp0_ = g_checksum_new (G_CHECKSUM_SHA1);
2879 #line 266 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2880 checksum = _tmp0_;
2881 #line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2882 _tmp1_ = base_uuid;
2883 #line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2884 _tmp1__length1 = base_uuid_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
2885 #line 268 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2886 g_checksum_update (checksum, _tmp1_, (gsize) 16);
2887 #line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2888 _tmp2_ = name;
2889 #line 271 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2890 g_checksum_update (checksum, (guchar*) _tmp2_, (gsize) (-1));
2891 #line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2892 _tmp3_ = g_checksum_get_string (checksum);
2893 #line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2894 _tmp4_ = g_strdup (_tmp3_);
2895 #line 273 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2896 sha1 = _tmp4_;
2897 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2898 _tmp5_ = string_substring (sha1, (glong) 8, (glong) (-1));
2899 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2900 _tmp6_ = _tmp5_;
2901 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2902 _tmp7_ = string_substring (sha1, (glong) 12, (glong) (-1));
2903 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2904 _tmp8_ = _tmp7_;
2905 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2906 _tmp9_ = string_substring (sha1, (glong) 16, (glong) (-1));
2907 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2908 _tmp10_ = _tmp9_;
2909 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2910 _tmp11_ = string_substring (sha1, (glong) 20, (glong) (-1));
2911 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2912 _tmp12_ = _tmp11_;
2913 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2914 _tmp13_ = g_strdup_printf ("urn:uuid:%.8s-%.4s-%.4s-%.4s-%.12s", sha1, _tmp6_, _tmp8_, _tmp10_, _tmp12_);
2915 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2916 _tmp14_ = _tmp13_;
2917 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2918 _g_free0 (_tmp12_);
2919 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2920 _g_free0 (_tmp10_);
2921 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2922 _g_free0 (_tmp8_);
2923 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2924 _g_free0 (_tmp6_);
2925 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2926 result = _tmp14_;
2927 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2928 _g_free0 (sha1);
2929 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2930 _g_checksum_free0 (checksum);
2931 #line 276 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2932 return result;
2933 #line 2934 "tracker-sparql-query.c"
2934 }
2935
2936
2937 gchar* tracker_sparql_query_generate_bnodeid (TrackerSparqlQuery* self, const gchar* user_bnodeid) {
2938 gchar* result = NULL;
2939 const gchar* _tmp0_;
2940 #line 280 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2941 g_return_val_if_fail (self != NULL, NULL);
2942 #line 282 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2943 _tmp0_ = user_bnodeid;
2944 #line 282 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2945 if (_tmp0_ == NULL) {
2946 #line 2947 "tracker-sparql-query.c"
2947 gint _tmp1_;
2948 gint _tmp2_;
2949 gchar* _tmp3_ = NULL;
2950 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2951 _tmp1_ = self->priv->bnodeid;
2952 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2953 self->priv->bnodeid = _tmp1_ + 1;
2954 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2955 _tmp2_ = self->priv->bnodeid;
2956 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2957 _tmp3_ = g_strdup_printf (":%d", _tmp2_);
2958 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2959 result = _tmp3_;
2960 #line 283 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2961 return result;
2962 #line 2963 "tracker-sparql-query.c"
2963 } else {
2964 gchar* uri;
2965 GHashTable* _tmp4_;
2966 guchar* _tmp10_;
2967 gint _tmp10__length1;
2968 const gchar* _tmp11_;
2969 gchar* _tmp12_ = NULL;
2970 GHashTable* _tmp13_;
2971 #line 285 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2972 uri = NULL;
2973 #line 287 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2974 _tmp4_ = self->priv->blank_nodes;
2975 #line 287 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2976 if (_tmp4_ != NULL) {
2977 #line 2978 "tracker-sparql-query.c"
2978 GHashTable* _tmp5_;
2979 const gchar* _tmp6_;
2980 gconstpointer _tmp7_ = NULL;
2981 gchar* _tmp8_;
2982 const gchar* _tmp9_;
2983 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2984 _tmp5_ = self->priv->blank_nodes;
2985 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2986 _tmp6_ = user_bnodeid;
2987 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2988 _tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
2989 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2990 _tmp8_ = g_strdup ((const gchar*) _tmp7_);
2991 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2992 _g_free0 (uri);
2993 #line 288 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2994 uri = _tmp8_;
2995 #line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2996 _tmp9_ = uri;
2997 #line 289 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
2998 if (_tmp9_ != NULL) {
2999 #line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3000 result = uri;
3001 #line 290 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3002 return result;
3003 #line 3004 "tracker-sparql-query.c"
3004 }
3005 }
3006 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3007 _tmp10_ = self->priv->base_uuid;
3008 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3009 _tmp10__length1 = self->priv->base_uuid_length1;
3010 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3011 _tmp11_ = user_bnodeid;
3012 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3013 _tmp12_ = tracker_sparql_query_get_uuid_for_name (self, _tmp10_, _tmp10__length1, _tmp11_);
3014 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3015 _g_free0 (uri);
3016 #line 294 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3017 uri = _tmp12_;
3018 #line 296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3019 _tmp13_ = self->priv->blank_nodes;
3020 #line 296 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3021 if (_tmp13_ != NULL) {
3022 #line 3023 "tracker-sparql-query.c"
3023 GHashTable* _tmp21_;
3024 const gchar* _tmp22_;
3025 gchar* _tmp23_;
3026 const gchar* _tmp24_;
3027 gchar* _tmp25_;
3028 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3029 while (TRUE) {
3030 #line 3031 "tracker-sparql-query.c"
3031 const gchar* _tmp14_;
3032 gint _tmp15_ = 0;
3033 guchar* _tmp16_ = NULL;
3034 guchar* new_base_uuid;
3035 gint new_base_uuid_length1;
3036 gint _new_base_uuid_size_;
3037 guchar* _tmp17_;
3038 gint _tmp17__length1;
(emitted by gcc) 3039 guchar* _tmp18_;
3040 gint _tmp18__length1;
3041 const gchar* _tmp19_;
3042 gchar* _tmp20_ = NULL;
3043 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3044 _tmp14_ = uri;
3045 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3046 _tmp15_ = tracker_data_query_resource_id (_tmp14_);
3047 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3048 if (!(_tmp15_ > 0)) {
3049 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3050 break;
3051 #line 3052 "tracker-sparql-query.c"
3052 }
3053 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3054 _tmp16_ = g_new0 (guchar, 16);
3055 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3056 new_base_uuid = _tmp16_;
3057 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3058 new_base_uuid_length1 = 16;
3059 #line 299 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3060 _new_base_uuid_size_ = new_base_uuid_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3061 #line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3062 _tmp17_ = new_base_uuid;
3063 #line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3064 _tmp17__length1 = new_base_uuid_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3065 #line 300 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3066 uuid_generate (_tmp17_);
3067 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3068 _tmp18_ = new_base_uuid;
3069 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3070 _tmp18__length1 = new_base_uuid_length1;
3071 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3072 _tmp19_ = user_bnodeid;
3073 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3074 _tmp20_ = tracker_sparql_query_get_uuid_for_name (self, _tmp18_, _tmp18__length1, _tmp19_);
3075 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3076 _g_free0 (uri);
3077 #line 301 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3078 uri = _tmp20_;
3079 #line 297 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3080 new_base_uuid = (g_free (new_base_uuid), NULL);
3081 #line 3082 "tracker-sparql-query.c"
3082 }
3083 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3084 _tmp21_ = self->priv->blank_nodes;
3085 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3086 _tmp22_ = user_bnodeid;
3087 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3088 _tmp23_ = g_strdup (_tmp22_);
3089 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3090 _tmp24_ = uri;
3091 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3092 _tmp25_ = g_strdup (_tmp24_);
3093 #line 304 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3094 g_hash_table_insert (_tmp21_, _tmp23_, _tmp25_);
3095 #line 3096 "tracker-sparql-query.c"
3096 }
3097 #line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3098 result = uri;
3099 #line 307 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3100 return result;
3101 #line 3102 "tracker-sparql-query.c"
3102 }
3103 }
3104
3105
3106 gboolean tracker_sparql_query_next (TrackerSparqlQuery* self, GError** error) {
3107 gboolean result = FALSE;
3108 gint _tmp0_;
3109 gint _tmp1_;
3110 gint _tmp2_;
3111 TrackerSparqlQueryTokenInfo* _tmp16_;
3112 gint _tmp16__length1;
3113 gint _tmp17_;
3114 TrackerSparqlQueryTokenInfo _tmp18_;
3115 TrackerSparqlTokenType _tmp19_;
3116 GError * _inner_error_ = NULL;
3117 #line 311 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3118 g_return_val_if_fail (self != NULL, FALSE);
3119 #line 312 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3120 _tmp0_ = self->priv->index;
3121 #line 312 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3122 self->priv->index = (_tmp0_ + 1) % TRACKER_SPARQL_QUERY_BUFFER_SIZE;
3123 #line 313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3124 _tmp1_ = self->priv->size;
3125 #line 313 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3126 self->priv->size = _tmp1_ - 1;
3127 #line 314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3128 _tmp2_ = self->priv->size;
3129 #line 314 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3130 if (_tmp2_ <= 0) {
3131 #line 3132 "tracker-sparql-query.c"
3132 TrackerSourceLocation begin = {0};
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3133 TrackerSourceLocation end = {0};
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3134 TrackerSparqlScanner* _tmp3_;
3135 TrackerSourceLocation _tmp4_ = {0};
3136 TrackerSourceLocation _tmp5_ = {0};
3137 TrackerSparqlTokenType _tmp6_ = 0;
3138 TrackerSparqlTokenType type;
3139 TrackerSparqlQueryTokenInfo* _tmp7_;
3140 gint _tmp7__length1;
3141 gint _tmp8_;
3142 TrackerSparqlTokenType _tmp9_;
3143 TrackerSparqlQueryTokenInfo* _tmp10_;
3144 gint _tmp10__length1;
3145 gint _tmp11_;
3146 TrackerSourceLocation _tmp12_;
3147 TrackerSparqlQueryTokenInfo* _tmp13_;
3148 gint _tmp13__length1;
(emitted by gcc) 3149 gint _tmp14_;
3150 TrackerSourceLocation _tmp15_;
3151 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3152 _tmp3_ = self->priv->scanner;
3153 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3154 _tmp6_ = tracker_sparql_scanner_read_token (_tmp3_, &_tmp4_, &_tmp5_, &_inner_error_);
3155 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3156 begin = _tmp4_;
3157 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3158 end = _tmp5_;
3159 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3160 type = _tmp6_;
3161 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3162 if (_inner_error_ != NULL) {
3163 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3164 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3165 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3166 g_propagate_error (error, _inner_error_);
3167 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3168 return FALSE;
3169 #line 3170 "tracker-sparql-query.c"
3170 } else {
3171 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3172 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3173 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3174 g_clear_error (&_inner_error_);
3175 #line 316 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3176 return FALSE;
3177 #line 3178 "tracker-sparql-query.c"
3178 }
3179 }
3180 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3181 _tmp7_ = self->priv->tokens;
3182 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3183 _tmp7__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3184 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3185 _tmp8_ = self->priv->index;
3186 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3187 _tmp9_ = type;
3188 #line 317 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3189 _tmp7_[_tmp8_].type = _tmp9_;
3190 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3191 _tmp10_ = self->priv->tokens;
3192 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3193 _tmp10__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3194 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3195 _tmp11_ = self->priv->index;
3196 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3197 _tmp12_ = begin;
3198 #line 318 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3199 _tmp10_[_tmp11_].begin = _tmp12_;
3200 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3201 _tmp13_ = self->priv->tokens;
3202 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3203 _tmp13__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3204 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3205 _tmp14_ = self->priv->index;
3206 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3207 _tmp15_ = end;
3208 #line 319 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3209 _tmp13_[_tmp14_].end = _tmp15_;
3210 #line 320 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3211 self->priv->size = 1;
3212 #line 3213 "tracker-sparql-query.c"
3213 }
3214 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3215 _tmp16_ = self->priv->tokens;
3216 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3217 _tmp16__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3218 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3219 _tmp17_ = self->priv->index;
3220 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3221 _tmp18_ = _tmp16_[_tmp17_];
3222 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3223 _tmp19_ = _tmp18_.type;
3224 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3225 result = _tmp19_ != TRACKER_SPARQL_TOKEN_TYPE_EOF;
3226 #line 322 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3227 return result;
3228 #line 3229 "tracker-sparql-query.c"
3229 }
3230
3231
3232 TrackerSparqlTokenType tracker_sparql_query_current (TrackerSparqlQuery* self) {
3233 TrackerSparqlTokenType result = 0;
3234 TrackerSparqlQueryTokenInfo* _tmp0_;
3235 gint _tmp0__length1;
(emitted by gcc) 3236 gint _tmp1_;
3237 TrackerSparqlQueryTokenInfo _tmp2_;
3238 TrackerSparqlTokenType _tmp3_;
3239 #line 325 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3240 g_return_val_if_fail (self != NULL, 0);
3241 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3242 _tmp0_ = self->priv->tokens;
3243 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3244 _tmp0__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3245 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3246 _tmp1_ = self->priv->index;
3247 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3248 _tmp2_ = _tmp0_[_tmp1_];
3249 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3250 _tmp3_ = _tmp2_.type;
3251 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3252 result = _tmp3_;
3253 #line 326 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3254 return result;
3255 #line 3256 "tracker-sparql-query.c"
3256 }
3257
3258
3259 TrackerSparqlTokenType tracker_sparql_query_last (TrackerSparqlQuery* self) {
3260 TrackerSparqlTokenType result = 0;
3261 gint _tmp0_;
3262 gint last_index;
3263 TrackerSparqlQueryTokenInfo* _tmp1_;
3264 gint _tmp1__length1;
(emitted by gcc) 3265 TrackerSparqlQueryTokenInfo _tmp2_;
3266 TrackerSparqlTokenType _tmp3_;
3267 #line 329 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3268 g_return_val_if_fail (self != NULL, 0);
3269 #line 330 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3270 _tmp0_ = self->priv->index;
3271 #line 330 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3272 last_index = ((_tmp0_ + TRACKER_SPARQL_QUERY_BUFFER_SIZE) - 1) % TRACKER_SPARQL_QUERY_BUFFER_SIZE;
3273 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3274 _tmp1_ = self->priv->tokens;
3275 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3276 _tmp1__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3277 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3278 _tmp2_ = _tmp1_[last_index];
3279 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3280 _tmp3_ = _tmp2_.type;
3281 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3282 result = _tmp3_;
3283 #line 331 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3284 return result;
3285 #line 3286 "tracker-sparql-query.c"
3286 }
3287
3288
3289 gboolean tracker_sparql_query_accept (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error) {
3290 gboolean result = FALSE;
3291 TrackerSparqlTokenType _tmp0_ = 0;
3292 TrackerSparqlTokenType _tmp1_;
3293 GError * _inner_error_ = NULL;
3294 #line 334 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3295 g_return_val_if_fail (self != NULL, FALSE);
3296 #line 335 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3297 _tmp0_ = tracker_sparql_query_current (self);
3298 #line 335 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3299 _tmp1_ = type;
3300 #line 335 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3301 if (_tmp0_ == _tmp1_) {
3302 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3303 tracker_sparql_query_next (self, &_inner_error_);
3304 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3305 if (_inner_error_ != NULL) {
3306 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3307 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3308 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3309 g_propagate_error (error, _inner_error_);
3310 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3311 return FALSE;
3312 #line 3313 "tracker-sparql-query.c"
3313 } else {
3314 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3315 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3316 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3317 g_clear_error (&_inner_error_);
3318 #line 336 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3319 return FALSE;
3320 #line 3321 "tracker-sparql-query.c"
3321 }
3322 }
3323 #line 337 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3324 result = TRUE;
3325 #line 337 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3326 return result;
3327 #line 3328 "tracker-sparql-query.c"
3328 }
3329 #line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3330 result = FALSE;
3331 #line 339 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3332 return result;
3333 #line 3334 "tracker-sparql-query.c"
3334 }
3335
3336
3337 GError* tracker_sparql_query_get_error (TrackerSparqlQuery* self, const gchar* msg) {
3338 GError* result = NULL;
3339 TrackerSparqlQueryTokenInfo* _tmp0_;
3340 gint _tmp0__length1;
3341 gint _tmp1_;
3342 TrackerSparqlQueryTokenInfo _tmp2_;
3343 TrackerSourceLocation _tmp3_;
3344 gint _tmp4_;
3345 TrackerSparqlQueryTokenInfo* _tmp5_;
3346 gint _tmp5__length1;
(emitted by gcc) 3347 gint _tmp6_;
3348 TrackerSparqlQueryTokenInfo _tmp7_;
3349 TrackerSourceLocation _tmp8_;
3350 gint _tmp9_;
3351 const gchar* _tmp10_;
3352 gchar* _tmp11_ = NULL;
3353 gchar* _tmp12_;
3354 GError* _tmp13_;
3355 GError* _tmp14_;
3356 #line 342 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3357 g_return_val_if_fail (self != NULL, NULL);
3358 #line 342 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3359 g_return_val_if_fail (msg != NULL, NULL);
3360 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3361 _tmp0_ = self->priv->tokens;
3362 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3363 _tmp0__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3364 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3365 _tmp1_ = self->priv->index;
3366 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3367 _tmp2_ = _tmp0_[_tmp1_];
3368 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3369 _tmp3_ = _tmp2_.begin;
3370 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3371 _tmp4_ = _tmp3_.line;
3372 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3373 _tmp5_ = self->priv->tokens;
3374 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3375 _tmp5__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3376 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3377 _tmp6_ = self->priv->index;
3378 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3379 _tmp7_ = _tmp5_[_tmp6_];
3380 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3381 _tmp8_ = _tmp7_.begin;
3382 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3383 _tmp9_ = _tmp8_.column;
3384 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3385 _tmp10_ = msg;
3386 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3387 _tmp11_ = g_strdup_printf ("%d.%d: syntax error, %s", _tmp4_, _tmp9_, _tmp10_);
3388 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3389 _tmp12_ = _tmp11_;
3390 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3391 _tmp13_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_PARSE, _tmp12_);
3392 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3393 _tmp14_ = _tmp13_;
3394 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3395 _g_free0 (_tmp12_);
3396 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3397 result = _tmp14_;
3398 #line 343 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3399 return result;
3400 #line 3401 "tracker-sparql-query.c"
3401 }
3402
3403
3404 GError* tracker_sparql_query_get_internal_error (TrackerSparqlQuery* self, const gchar* msg) {
3405 GError* result = NULL;
3406 TrackerSparqlQueryTokenInfo* _tmp0_;
3407 gint _tmp0__length1;
3408 gint _tmp1_;
3409 TrackerSparqlQueryTokenInfo _tmp2_;
3410 TrackerSourceLocation _tmp3_;
3411 gint _tmp4_;
3412 TrackerSparqlQueryTokenInfo* _tmp5_;
3413 gint _tmp5__length1;
(emitted by gcc) 3414 gint _tmp6_;
3415 TrackerSparqlQueryTokenInfo _tmp7_;
3416 TrackerSourceLocation _tmp8_;
3417 gint _tmp9_;
3418 const gchar* _tmp10_;
3419 gchar* _tmp11_ = NULL;
3420 gchar* _tmp12_;
3421 GError* _tmp13_;
3422 GError* _tmp14_;
3423 #line 346 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3424 g_return_val_if_fail (self != NULL, NULL);
3425 #line 346 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3426 g_return_val_if_fail (msg != NULL, NULL);
3427 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3428 _tmp0_ = self->priv->tokens;
3429 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3430 _tmp0__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3431 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3432 _tmp1_ = self->priv->index;
3433 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3434 _tmp2_ = _tmp0_[_tmp1_];
3435 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3436 _tmp3_ = _tmp2_.begin;
3437 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3438 _tmp4_ = _tmp3_.line;
3439 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3440 _tmp5_ = self->priv->tokens;
3441 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3442 _tmp5__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3443 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3444 _tmp6_ = self->priv->index;
3445 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3446 _tmp7_ = _tmp5_[_tmp6_];
3447 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3448 _tmp8_ = _tmp7_.begin;
3449 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3450 _tmp9_ = _tmp8_.column;
3451 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3452 _tmp10_ = msg;
3453 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3454 _tmp11_ = g_strdup_printf ("%d.%d: %s", _tmp4_, _tmp9_, _tmp10_);
3455 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3456 _tmp12_ = _tmp11_;
3457 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3458 _tmp13_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _tmp12_);
3459 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3460 _tmp14_ = _tmp13_;
3461 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3462 _g_free0 (_tmp12_);
3463 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3464 result = _tmp14_;
3465 #line 347 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3466 return result;
3467 #line 3468 "tracker-sparql-query.c"
3468 }
3469
3470
3471 gboolean tracker_sparql_query_expect (TrackerSparqlQuery* self, TrackerSparqlTokenType type, GError** error) {
3472 gboolean result = FALSE;
3473 TrackerSparqlTokenType _tmp0_;
3474 gboolean _tmp1_ = FALSE;
3475 gboolean _tmp2_;
3476 TrackerSparqlTokenType _tmp3_;
3477 const gchar* _tmp4_ = NULL;
3478 gchar* _tmp5_ = NULL;
3479 gchar* _tmp6_;
3480 GError* _tmp7_ = NULL;
3481 GError* _tmp8_;
3482 GError * _inner_error_ = NULL;
3483 #line 350 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3484 g_return_val_if_fail (self != NULL, FALSE);
3485 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3486 _tmp0_ = type;
3487 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3488 _tmp1_ = tracker_sparql_query_accept (self, _tmp0_, &_inner_error_);
3489 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3490 _tmp2_ = _tmp1_;
3491 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3492 if (_inner_error_ != NULL) {
3493 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3494 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3495 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3496 g_propagate_error (error, _inner_error_);
3497 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3498 return FALSE;
3499 #line 3500 "tracker-sparql-query.c"
3500 } else {
3501 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3502 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3503 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3504 g_clear_error (&_inner_error_);
3505 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3506 return FALSE;
3507 #line 3508 "tracker-sparql-query.c"
3508 }
3509 }
3510 #line 351 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3511 if (_tmp2_) {
3512 #line 352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3513 result = TRUE;
3514 #line 352 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3515 return result;
3516 #line 3517 "tracker-sparql-query.c"
3517 }
3518 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3519 _tmp3_ = type;
3520 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3521 _tmp4_ = tracker_sparql_token_type_to_string (_tmp3_);
3522 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3523 _tmp5_ = g_strdup_printf ("expected %s", _tmp4_);
3524 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3525 _tmp6_ = _tmp5_;
3526 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3527 _tmp7_ = tracker_sparql_query_get_error (self, _tmp6_);
3528 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3529 _tmp8_ = _tmp7_;
3530 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3531 _g_free0 (_tmp6_);
3532 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3533 _inner_error_ = _tmp8_;
3534 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3535 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3536 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3537 g_propagate_error (error, _inner_error_);
3538 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3539 return FALSE;
3540 #line 3541 "tracker-sparql-query.c"
3541 } else {
3542 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3543 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3544 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3545 g_clear_error (&_inner_error_);
3546 #line 355 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3547 return FALSE;
3548 #line 3549 "tracker-sparql-query.c"
3549 }
3550 }
3551
3552
3553 void tracker_sparql_query_get_location (TrackerSparqlQuery* self, TrackerSourceLocation* result) {
3554 TrackerSparqlQueryTokenInfo* _tmp0_;
3555 gint _tmp0__length1;
(emitted by gcc) 3556 gint _tmp1_;
3557 TrackerSparqlQueryTokenInfo _tmp2_;
3558 TrackerSourceLocation _tmp3_;
3559 #line 358 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3560 g_return_if_fail (self != NULL);
3561 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3562 _tmp0_ = self->priv->tokens;
3563 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3564 _tmp0__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3565 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3566 _tmp1_ = self->priv->index;
3567 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3568 _tmp2_ = _tmp0_[_tmp1_];
3569 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3570 _tmp3_ = _tmp2_.begin;
3571 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3572 *result = _tmp3_;
3573 #line 359 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3574 return;
3575 #line 3576 "tracker-sparql-query.c"
3576 }
3577
3578
3579 void tracker_sparql_query_set_location (TrackerSparqlQuery* self, TrackerSourceLocation* location) {
3580 TrackerSparqlScanner* _tmp0_;
3581 TrackerSourceLocation _tmp1_;
3582 GError * _inner_error_ = NULL;
3583 #line 362 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3584 g_return_if_fail (self != NULL);
3585 #line 362 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3586 g_return_if_fail (location != NULL);
3587 #line 363 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3588 _tmp0_ = self->priv->scanner;
3589 #line 363 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3590 _tmp1_ = *location;
3591 #line 363 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3592 tracker_sparql_scanner_seek (_tmp0_, &_tmp1_);
3593 #line 364 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3594 self->priv->size = 0;
3595 #line 365 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3596 self->priv->index = 0;
3597 #line 3598 "tracker-sparql-query.c"
3598 {
3599 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3600 tracker_sparql_query_next (self, &_inner_error_);
3601 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3602 if (_inner_error_ != NULL) {
3603 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3604 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3605 #line 3606 "tracker-sparql-query.c"
3606 goto __catch2_tracker_sparql_error;
3607 }
3608 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3609 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3610 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3611 g_clear_error (&_inner_error_);
3612 #line 367 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3613 return;
3614 #line 3615 "tracker-sparql-query.c"
3615 }
3616 }
3617 goto __finally2;
3618 __catch2_tracker_sparql_error:
3619 {
3620 GError* e = NULL;
3621 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3622 e = _inner_error_;
3623 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3624 _inner_error_ = NULL;
3625 #line 370 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3626 g_critical ("internal error: next in set_location failed");
3627 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3628 _g_error_free0 (e);
3629 #line 3630 "tracker-sparql-query.c"
3630 }
3631 __finally2:
3632 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3633 if (_inner_error_ != NULL) {
3634 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3635 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3636 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3637 g_clear_error (&_inner_error_);
3638 #line 366 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3639 return;
3640 #line 3641 "tracker-sparql-query.c"
3641 }
3642 }
3643
3644
3645 gchar* tracker_sparql_query_get_last_string (TrackerSparqlQuery* self, gint strip) {
3646 gchar* result = NULL;
3647 gint _tmp0_;
3648 gint last_index;
3649 TrackerSparqlQueryTokenInfo* _tmp1_;
3650 gint _tmp1__length1;
3651 TrackerSparqlQueryTokenInfo _tmp2_;
3652 TrackerSourceLocation _tmp3_;
3653 gchar* _tmp4_;
3654 gint _tmp5_;
3655 TrackerSparqlQueryTokenInfo* _tmp6_;
3656 gint _tmp6__length1;
3657 TrackerSparqlQueryTokenInfo _tmp7_;
3658 TrackerSourceLocation _tmp8_;
3659 gchar* _tmp9_;
3660 TrackerSparqlQueryTokenInfo* _tmp10_;
3661 gint _tmp10__length1;
(emitted by gcc) 3662 TrackerSparqlQueryTokenInfo _tmp11_;
3663 TrackerSourceLocation _tmp12_;
3664 gchar* _tmp13_;
3665 gint _tmp14_;
3666 gchar* _tmp15_ = NULL;
3667 #line 374 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3668 g_return_val_if_fail (self != NULL, NULL);
3669 #line 375 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3670 _tmp0_ = self->priv->index;
3671 #line 375 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3672 last_index = ((_tmp0_ + TRACKER_SPARQL_QUERY_BUFFER_SIZE) - 1) % TRACKER_SPARQL_QUERY_BUFFER_SIZE;
3673 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3674 _tmp1_ = self->priv->tokens;
3675 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3676 _tmp1__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3677 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3678 _tmp2_ = _tmp1_[last_index];
3679 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3680 _tmp3_ = _tmp2_.begin;
3681 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3682 _tmp4_ = _tmp3_.pos;
3683 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3684 _tmp5_ = strip;
3685 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3686 _tmp6_ = self->priv->tokens;
3687 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3688 _tmp6__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3689 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3690 _tmp7_ = _tmp6_[last_index];
3691 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3692 _tmp8_ = _tmp7_.end;
3693 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3694 _tmp9_ = _tmp8_.pos;
3695 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3696 _tmp10_ = self->priv->tokens;
3697 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3698 _tmp10__length1 = self->priv->tokens_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
3699 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3700 _tmp11_ = _tmp10_[last_index];
3701 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3702 _tmp12_ = _tmp11_.begin;
3703 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3704 _tmp13_ = _tmp12_.pos;
3705 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3706 _tmp14_ = strip;
3707 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3708 _tmp15_ = string_substring ((const gchar*) (_tmp4_ + _tmp5_), (glong) 0, (glong) ((gint) ((_tmp9_ - _tmp13_) - (2 * _tmp14_))));
3709 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3710 result = _tmp15_;
3711 #line 376 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3712 return result;
3713 #line 3714 "tracker-sparql-query.c"
3714 }
3715
3716
3717 static void tracker_sparql_query_parse_prologue (TrackerSparqlQuery* self, GError** error) {
3718 gboolean _tmp0_ = FALSE;
3719 gboolean _tmp1_;
3720 GError * _inner_error_ = NULL;
3721 #line 379 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3722 g_return_if_fail (self != NULL);
3723 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3724 _tmp0_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_BASE, &_inner_error_);
3725 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3726 _tmp1_ = _tmp0_;
3727 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3728 if (_inner_error_ != NULL) {
3729 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3730 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3731 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3732 g_propagate_error (error, _inner_error_);
3733 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3734 return;
3735 #line 3736 "tracker-sparql-query.c"
3736 } else {
3737 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3738 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3739 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3740 g_clear_error (&_inner_error_);
3741 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3742 return;
3743 #line 3744 "tracker-sparql-query.c"
3744 }
3745 }
3746 #line 380 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3747 if (_tmp1_) {
3748 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3749 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, &_inner_error_);
3750 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3751 if (_inner_error_ != NULL) {
3752 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3753 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3754 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3755 g_propagate_error (error, _inner_error_);
3756 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3757 return;
3758 #line 3759 "tracker-sparql-query.c"
3759 } else {
3760 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3761 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3762 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3763 g_clear_error (&_inner_error_);
3764 #line 381 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3765 return;
3766 #line 3767 "tracker-sparql-query.c"
3767 }
3768 }
3769 }
3770 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3771 while (TRUE) {
3772 #line 3773 "tracker-sparql-query.c"
3773 gboolean _tmp2_ = FALSE;
3774 gboolean _tmp3_;
3775 gchar* _tmp4_;
3776 gchar* ns;
3777 gboolean _tmp5_ = FALSE;
3778 gboolean _tmp6_;
3779 gchar* _tmp8_ = NULL;
3780 gchar* uri;
3781 GHashTable* _tmp9_;
3782 const gchar* _tmp10_;
3783 gchar* _tmp11_;
3784 const gchar* _tmp12_;
3785 gchar* _tmp13_;
3786 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3787 _tmp2_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_PREFIX, &_inner_error_);
3788 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3789 _tmp3_ = _tmp2_;
3790 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3791 if (_inner_error_ != NULL) {
3792 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3793 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3794 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3795 g_propagate_error (error, _inner_error_);
3796 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3797 return;
3798 #line 3799 "tracker-sparql-query.c"
3799 } else {
3800 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3801 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3802 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3803 g_clear_error (&_inner_error_);
3804 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3805 return;
3806 #line 3807 "tracker-sparql-query.c"
3807 }
3808 }
3809 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3810 if (!_tmp3_) {
3811 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3812 break;
3813 #line 3814 "tracker-sparql-query.c"
3814 }
3815 #line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3816 _tmp4_ = g_strdup ("");
3817 #line 384 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3818 ns = _tmp4_;
3819 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3820 _tmp5_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX, &_inner_error_);
3821 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3822 _tmp6_ = _tmp5_;
3823 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3824 if (_inner_error_ != NULL) {
3825 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3826 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3827 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3828 g_propagate_error (error, _inner_error_);
3829 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3830 _g_free0 (ns);
3831 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3832 return;
3833 #line 3834 "tracker-sparql-query.c"
3834 } else {
3835 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3836 _g_free0 (ns);
3837 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3838 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3839 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3840 g_clear_error (&_inner_error_);
3841 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3842 return;
3843 #line 3844 "tracker-sparql-query.c"
3844 }
3845 }
3846 #line 385 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3847 if (_tmp6_) {
3848 #line 3849 "tracker-sparql-query.c"
3849 gchar* _tmp7_ = NULL;
3850 #line 386 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3851 _tmp7_ = tracker_sparql_query_get_last_string (self, 0);
3852 #line 386 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3853 _g_free0 (ns);
3854 #line 386 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3855 ns = _tmp7_;
3856 #line 3857 "tracker-sparql-query.c"
3857 }
3858 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3859 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
3860 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3861 if (_inner_error_ != NULL) {
3862 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3863 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3864 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3865 g_propagate_error (error, _inner_error_);
3866 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3867 _g_free0 (ns);
3868 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3869 return;
3870 #line 3871 "tracker-sparql-query.c"
3871 } else {
3872 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3873 _g_free0 (ns);
3874 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3875 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3876 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3877 g_clear_error (&_inner_error_);
3878 #line 388 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3879 return;
3880 #line 3881 "tracker-sparql-query.c"
3881 }
3882 }
3883 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3884 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, &_inner_error_);
3885 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3886 if (_inner_error_ != NULL) {
3887 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3888 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
3889 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3890 g_propagate_error (error, _inner_error_);
3891 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3892 _g_free0 (ns);
3893 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3894 return;
3895 #line 3896 "tracker-sparql-query.c"
3896 } else {
3897 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3898 _g_free0 (ns);
3899 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3900 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3901 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3902 g_clear_error (&_inner_error_);
3903 #line 389 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3904 return;
3905 #line 3906 "tracker-sparql-query.c"
3906 }
3907 }
3908 #line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3909 _tmp8_ = tracker_sparql_query_get_last_string (self, 1);
3910 #line 390 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3911 uri = _tmp8_;
3912 #line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3913 _tmp9_ = self->priv->prefix_map;
3914 #line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3915 _tmp10_ = ns;
3916 #line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3917 _tmp11_ = g_strdup (_tmp10_);
3918 #line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3919 _tmp12_ = uri;
3920 #line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3921 _tmp13_ = g_strdup (_tmp12_);
3922 #line 391 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3923 g_hash_table_insert (_tmp9_, _tmp11_, _tmp13_);
3924 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3925 _g_free0 (uri);
3926 #line 383 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3927 _g_free0 (ns);
3928 #line 3929 "tracker-sparql-query.c"
3929 }
3930 }
3931
3932
3933 static void tracker_sparql_query_prepare_execute (TrackerSparqlQuery* self, GError** error) {
3934 gboolean _tmp0_;
3935 const gchar* _tmp1_;
3936 const gchar* _tmp2_;
3937 gint _tmp3_;
3938 gint _tmp4_;
3939 TrackerSparqlScanner* _tmp5_;
3940 GHashTable* _tmp6_;
3941 gchar* _tmp7_;
3942 gchar* _tmp8_;
3943 gint _tmp9_ = 0;
3944 TrackerNamespace** _tmp10_ = NULL;
3945 GError * _inner_error_ = NULL;
3946 #line 395 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3947 g_return_if_fail (self != NULL);
3948 #line 396 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3949 _tmp0_ = self->priv->update_extensions;
3950 #line 396 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3951 _vala_assert (!_tmp0_, "!update_extensions");
3952 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3953 _tmp1_ = self->priv->query_string;
3954 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3955 _tmp2_ = self->priv->query_string;
3956 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3957 _tmp3_ = strlen (_tmp2_);
3958 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3959 _tmp4_ = _tmp3_;
3960 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3961 _tmp5_ = tracker_sparql_scanner_new ((gchar*) _tmp1_, (gsize) ((glong) _tmp4_));
3962 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3963 _g_object_unref0 (self->priv->scanner);
3964 #line 398 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3965 self->priv->scanner = _tmp5_;
3966 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3967 tracker_sparql_query_next (self, &_inner_error_);
3968 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3969 if (_inner_error_ != NULL) {
3970 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3971 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
3972 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3973 g_propagate_error (error, _inner_error_);
3974 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3975 return;
3976 #line 3977 "tracker-sparql-query.c"
3977 } else {
3978 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3979 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
3980 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3981 g_clear_error (&_inner_error_);
3982 #line 399 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3983 return;
3984 #line 3985 "tracker-sparql-query.c"
3985 }
3986 }
3987 #line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3988 _tmp6_ = self->priv->prefix_map;
3989 #line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3990 _tmp7_ = g_strdup ("fn");
3991 #line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3992 _tmp8_ = g_strdup (TRACKER_SPARQL_QUERY_FN_NS);
3993 #line 402 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3994 g_hash_table_insert (_tmp6_, _tmp7_, _tmp8_);
3995 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
3996 _tmp10_ = tracker_ontologies_get_namespaces (&_tmp9_);
3997 #line 3998 "tracker-sparql-query.c"
3998 {
3999 TrackerNamespace** ns_collection = NULL;
4000 gint ns_collection_length1 = 0;
4001 gint _ns_collection_size_ = 0;
4002 gint ns_it = 0;
4003 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4004 ns_collection = _tmp10_;
4005 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4006 ns_collection_length1 = _tmp9_;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
4007 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4008 for (ns_it = 0; ns_it < _tmp9_; ns_it = ns_it + 1) {
4009 #line 4010 "tracker-sparql-query.c"
4010 TrackerNamespace* _tmp11_;
4011 TrackerNamespace* ns = NULL;
4012 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4013 _tmp11_ = _g_object_ref0 (ns_collection[ns_it]);
4014 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4015 ns = _tmp11_;
4016 #line 4017 "tracker-sparql-query.c"
4017 {
4018 TrackerNamespace* _tmp12_;
4019 const gchar* _tmp13_;
4020 const gchar* _tmp14_;
4021 GHashTable* _tmp18_;
4022 TrackerNamespace* _tmp19_;
4023 const gchar* _tmp20_;
4024 const gchar* _tmp21_;
4025 gchar* _tmp22_;
4026 TrackerNamespace* _tmp23_;
4027 const gchar* _tmp24_;
4028 const gchar* _tmp25_;
4029 gchar* _tmp26_;
4030 #line 405 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4031 _tmp12_ = ns;
4032 #line 405 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4033 _tmp13_ = tracker_namespace_get_prefix (_tmp12_);
4034 #line 405 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4035 _tmp14_ = _tmp13_;
4036 #line 405 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4037 if (_tmp14_ == NULL) {
4038 #line 4039 "tracker-sparql-query.c"
4039 TrackerNamespace* _tmp15_;
4040 const gchar* _tmp16_;
4041 const gchar* _tmp17_;
4042 #line 406 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4043 _tmp15_ = ns;
4044 #line 406 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4045 _tmp16_ = tracker_namespace_get_uri (_tmp15_);
4046 #line 406 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4047 _tmp17_ = _tmp16_;
4048 #line 406 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4049 g_critical ("Namespace does not specify a prefix: %s", _tmp17_);
4050 #line 407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4051 _g_object_unref0 (ns);
4052 #line 407 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4053 continue;
4054 #line 4055 "tracker-sparql-query.c"
4055 }
4056 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4057 _tmp18_ = self->priv->prefix_map;
4058 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4059 _tmp19_ = ns;
4060 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4061 _tmp20_ = tracker_namespace_get_prefix (_tmp19_);
4062 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4063 _tmp21_ = _tmp20_;
4064 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4065 _tmp22_ = g_strdup (_tmp21_);
4066 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4067 _tmp23_ = ns;
4068 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4069 _tmp24_ = tracker_namespace_get_uri (_tmp23_);
4070 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4071 _tmp25_ = _tmp24_;
4072 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4073 _tmp26_ = g_strdup (_tmp25_);
4074 #line 409 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4075 g_hash_table_insert (_tmp18_, _tmp22_, _tmp26_);
4076 #line 404 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4077 _g_object_unref0 (ns);
4078 #line 4079 "tracker-sparql-query.c"
4079 }
4080 }
4081 }
4082 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4083 tracker_sparql_query_parse_prologue (self, &_inner_error_);
4084 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4085 if (_inner_error_ != NULL) {
4086 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4087 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4088 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4089 g_propagate_error (error, _inner_error_);
4090 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4091 return;
4092 #line 4093 "tracker-sparql-query.c"
4093 } else {
4094 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4095 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4096 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4097 g_clear_error (&_inner_error_);
4098 #line 412 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4099 return;
4100 #line 4101 "tracker-sparql-query.c"
4101 }
4102 }
4103 }
4104
4105
4106 TrackerDBCursor* tracker_sparql_query_execute_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error) {
4107 TrackerDBCursor* result = NULL;
4108 TrackerSparqlTokenType _tmp0_ = 0;
4109 GError * _inner_error_ = NULL;
4110 #line 416 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4111 g_return_val_if_fail (self != NULL, NULL);
4112 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4113 tracker_sparql_query_prepare_execute (self, &_inner_error_);
4114 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4115 if (_inner_error_ != NULL) {
4116 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4117 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4118 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4119 g_propagate_error (error, _inner_error_);
4120 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4121 return NULL;
4122 #line 4123 "tracker-sparql-query.c"
4123 } else {
4124 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4125 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4126 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4127 g_clear_error (&_inner_error_);
4128 #line 418 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4129 return NULL;
4130 #line 4131 "tracker-sparql-query.c"
4131 }
4132 }
4133 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4134 _tmp0_ = tracker_sparql_query_current (self);
4135 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4136 switch (_tmp0_) {
4137 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4138 case TRACKER_SPARQL_TOKEN_TYPE_SELECT:
4139 #line 4140 "tracker-sparql-query.c"
4140 {
4141 gboolean _tmp1_;
4142 TrackerDBCursor* _tmp2_ = NULL;
4143 TrackerDBCursor* _tmp3_;
4144 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4145 _tmp1_ = threadsafe;
4146 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4147 _tmp2_ = tracker_sparql_query_execute_select_cursor (self, _tmp1_, &_inner_error_);
4148 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4149 _tmp3_ = _tmp2_;
4150 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4151 if (_inner_error_ != NULL) {
4152 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4153 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4154 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4155 g_propagate_error (error, _inner_error_);
4156 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4157 return NULL;
4158 #line 4159 "tracker-sparql-query.c"
4159 } else {
4160 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4161 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4162 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4163 g_clear_error (&_inner_error_);
4164 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4165 return NULL;
4166 #line 4167 "tracker-sparql-query.c"
4167 }
4168 }
4169 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4170 result = _tmp3_;
4171 #line 422 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4172 return result;
4173 #line 4174 "tracker-sparql-query.c"
4174 }
4175 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4176 case TRACKER_SPARQL_TOKEN_TYPE_CONSTRUCT:
4177 #line 4178 "tracker-sparql-query.c"
4178 {
4179 GError* _tmp4_ = NULL;
4180 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4181 _tmp4_ = tracker_sparql_query_get_internal_error (self, "CONSTRUCT is not supported");
4182 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4183 _inner_error_ = _tmp4_;
4184 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4185 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4186 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4187 g_propagate_error (error, _inner_error_);
4188 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4189 return NULL;
4190 #line 4191 "tracker-sparql-query.c"
4191 } else {
4192 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4193 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4194 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4195 g_clear_error (&_inner_error_);
4196 #line 424 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4197 return NULL;
4198 #line 4199 "tracker-sparql-query.c"
4199 }
4200 }
4201 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4202 case TRACKER_SPARQL_TOKEN_TYPE_DESCRIBE:
4203 #line 4204 "tracker-sparql-query.c"
4204 {
4205 GError* _tmp5_ = NULL;
4206 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4207 _tmp5_ = tracker_sparql_query_get_internal_error (self, "DESCRIBE is not supported");
4208 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4209 _inner_error_ = _tmp5_;
4210 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4211 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4212 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4213 g_propagate_error (error, _inner_error_);
4214 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4215 return NULL;
4216 #line 4217 "tracker-sparql-query.c"
4217 } else {
4218 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4219 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4220 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4221 g_clear_error (&_inner_error_);
4222 #line 426 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4223 return NULL;
4224 #line 4225 "tracker-sparql-query.c"
4225 }
4226 }
4227 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4228 case TRACKER_SPARQL_TOKEN_TYPE_ASK:
4229 #line 4230 "tracker-sparql-query.c"
4230 {
4231 gboolean _tmp6_;
4232 TrackerDBCursor* _tmp7_ = NULL;
4233 TrackerDBCursor* _tmp8_;
4234 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4235 _tmp6_ = threadsafe;
4236 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4237 _tmp7_ = tracker_sparql_query_execute_ask_cursor (self, _tmp6_, &_inner_error_);
4238 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4239 _tmp8_ = _tmp7_;
4240 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4241 if (_inner_error_ != NULL) {
4242 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4243 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4244 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4245 g_propagate_error (error, _inner_error_);
4246 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4247 return NULL;
4248 #line 4249 "tracker-sparql-query.c"
4249 } else {
4250 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4251 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4252 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4253 g_clear_error (&_inner_error_);
4254 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4255 return NULL;
4256 #line 4257 "tracker-sparql-query.c"
4257 }
4258 }
4259 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4260 result = _tmp8_;
4261 #line 428 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4262 return result;
4263 #line 4264 "tracker-sparql-query.c"
4264 }
4265 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4266 case TRACKER_SPARQL_TOKEN_TYPE_INSERT:
4267 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4268 case TRACKER_SPARQL_TOKEN_TYPE_DELETE:
4269 #line 420 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4270 case TRACKER_SPARQL_TOKEN_TYPE_DROP:
4271 #line 4272 "tracker-sparql-query.c"
4272 {
4273 GError* _tmp9_ = NULL;
4274 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4275 _tmp9_ = tracker_sparql_query_get_error (self, "INSERT and DELETE are not supported in query mode");
4276 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4277 _inner_error_ = _tmp9_;
4278 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4279 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4280 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4281 g_propagate_error (error, _inner_error_);
4282 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4283 return NULL;
4284 #line 4285 "tracker-sparql-query.c"
4285 } else {
4286 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4287 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4288 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4289 g_clear_error (&_inner_error_);
4290 #line 432 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4291 return NULL;
4292 #line 4293 "tracker-sparql-query.c"
4293 }
4294 }
4295 default:
4296 {
4297 GError* _tmp10_ = NULL;
4298 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4299 _tmp10_ = tracker_sparql_query_get_error (self, "expected SELECT or ASK");
4300 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4301 _inner_error_ = _tmp10_;
4302 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4303 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4304 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4305 g_propagate_error (error, _inner_error_);
4306 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4307 return NULL;
4308 #line 4309 "tracker-sparql-query.c"
4309 } else {
4310 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4311 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4312 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4313 g_clear_error (&_inner_error_);
4314 #line 434 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4315 return NULL;
4316 #line 4317 "tracker-sparql-query.c"
4317 }
4318 }
4319 }
4320 }
4321
4322
4323 GVariant* tracker_sparql_query_execute_update (TrackerSparqlQuery* self, gboolean blank, GError** error) {
4324 GVariant* result = NULL;
4325 GVariant* _result_;
4326 gboolean _tmp0_;
4327 const gchar* _tmp1_;
4328 const gchar* _tmp2_;
4329 gint _tmp3_;
4330 gint _tmp4_;
4331 TrackerSparqlScanner* _tmp5_;
4332 GHashTable* _tmp6_;
4333 gchar* _tmp7_;
4334 gchar* _tmp8_;
4335 gint _tmp9_ = 0;
4336 TrackerNamespace** _tmp10_ = NULL;
4337 GVariantBuilder* ublank_nodes;
4338 gboolean _tmp27_;
4339 gboolean _tmp38_;
4340 GError * _inner_error_ = NULL;
4341 #line 438 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4342 g_return_val_if_fail (self != NULL, NULL);
4343 #line 439 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4344 _result_ = NULL;
4345 #line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4346 _tmp0_ = self->priv->update_extensions;
4347 #line 440 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4348 _vala_assert (_tmp0_, "update_extensions");
4349 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4350 _tmp1_ = self->priv->query_string;
4351 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4352 _tmp2_ = self->priv->query_string;
4353 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4354 _tmp3_ = strlen (_tmp2_);
4355 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4356 _tmp4_ = _tmp3_;
4357 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4358 _tmp5_ = tracker_sparql_scanner_new ((gchar*) _tmp1_, (gsize) ((glong) _tmp4_));
4359 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4360 _g_object_unref0 (self->priv->scanner);
4361 #line 442 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4362 self->priv->scanner = _tmp5_;
4363 #line 443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4364 tracker_sparql_query_next (self, &_inner_error_);
4365 #line 443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4366 if (_inner_error_ != NULL) {
4367 #line 443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4368 g_propagate_error (error, _inner_error_);
4369 #line 443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4370 _g_variant_unref0 (_result_);
4371 #line 443 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4372 return NULL;
4373 #line 4374 "tracker-sparql-query.c"
4374 }
4375 #line 446 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4376 _tmp6_ = self->priv->prefix_map;
4377 #line 446 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4378 _tmp7_ = g_strdup ("fn");
4379 #line 446 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4380 _tmp8_ = g_strdup (TRACKER_SPARQL_QUERY_FN_NS);
4381 #line 446 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4382 g_hash_table_insert (_tmp6_, _tmp7_, _tmp8_);
4383 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4384 _tmp10_ = tracker_ontologies_get_namespaces (&_tmp9_);
4385 #line 4386 "tracker-sparql-query.c"
4386 {
4387 TrackerNamespace** ns_collection = NULL;
4388 gint ns_collection_length1 = 0;
4389 gint _ns_collection_size_ = 0;
4390 gint ns_it = 0;
4391 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4392 ns_collection = _tmp10_;
4393 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4394 ns_collection_length1 = _tmp9_;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
4395 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4396 for (ns_it = 0; ns_it < _tmp9_; ns_it = ns_it + 1) {
4397 #line 4398 "tracker-sparql-query.c"
4398 TrackerNamespace* _tmp11_;
4399 TrackerNamespace* ns = NULL;
4400 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4401 _tmp11_ = _g_object_ref0 (ns_collection[ns_it]);
4402 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4403 ns = _tmp11_;
4404 #line 4405 "tracker-sparql-query.c"
4405 {
4406 TrackerNamespace* _tmp12_;
4407 const gchar* _tmp13_;
4408 const gchar* _tmp14_;
4409 GHashTable* _tmp18_;
4410 TrackerNamespace* _tmp19_;
4411 const gchar* _tmp20_;
4412 const gchar* _tmp21_;
4413 gchar* _tmp22_;
4414 TrackerNamespace* _tmp23_;
4415 const gchar* _tmp24_;
4416 const gchar* _tmp25_;
4417 gchar* _tmp26_;
4418 #line 449 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4419 _tmp12_ = ns;
4420 #line 449 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4421 _tmp13_ = tracker_namespace_get_prefix (_tmp12_);
4422 #line 449 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4423 _tmp14_ = _tmp13_;
4424 #line 449 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4425 if (_tmp14_ == NULL) {
4426 #line 4427 "tracker-sparql-query.c"
4427 TrackerNamespace* _tmp15_;
4428 const gchar* _tmp16_;
4429 const gchar* _tmp17_;
4430 #line 450 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4431 _tmp15_ = ns;
4432 #line 450 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4433 _tmp16_ = tracker_namespace_get_uri (_tmp15_);
4434 #line 450 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4435 _tmp17_ = _tmp16_;
4436 #line 450 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4437 g_critical ("Namespace does not specify a prefix: %s", _tmp17_);
4438 #line 451 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4439 _g_object_unref0 (ns);
4440 #line 451 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4441 continue;
4442 #line 4443 "tracker-sparql-query.c"
4443 }
4444 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4445 _tmp18_ = self->priv->prefix_map;
4446 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4447 _tmp19_ = ns;
4448 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4449 _tmp20_ = tracker_namespace_get_prefix (_tmp19_);
4450 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4451 _tmp21_ = _tmp20_;
4452 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4453 _tmp22_ = g_strdup (_tmp21_);
4454 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4455 _tmp23_ = ns;
4456 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4457 _tmp24_ = tracker_namespace_get_uri (_tmp23_);
4458 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4459 _tmp25_ = _tmp24_;
4460 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4461 _tmp26_ = g_strdup (_tmp25_);
4462 #line 453 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4463 g_hash_table_insert (_tmp18_, _tmp22_, _tmp26_);
4464 #line 448 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4465 _g_object_unref0 (ns);
4466 #line 4467 "tracker-sparql-query.c"
4467 }
4468 }
4469 }
4470 #line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4471 tracker_sparql_query_parse_prologue (self, &_inner_error_);
4472 #line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4473 if (_inner_error_ != NULL) {
4474 #line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4475 g_propagate_error (error, _inner_error_);
4476 #line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4477 _g_variant_unref0 (_result_);
4478 #line 456 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4479 return NULL;
4480 #line 4481 "tracker-sparql-query.c"
4481 }
4482 #line 459 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4483 ublank_nodes = NULL;
4484 #line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4485 _tmp27_ = blank;
4486 #line 461 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4487 if (_tmp27_) {
4488 #line 4489 "tracker-sparql-query.c"
4489 GVariantBuilder* _tmp28_;
4490 #line 462 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4491 _tmp28_ = g_variant_builder_new ((const GVariantType*) "aaa{ss}");
4492 #line 462 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4493 _g_variant_builder_unref0 (ublank_nodes);
4494 #line 462 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4495 ublank_nodes = _tmp28_;
4496 #line 4497 "tracker-sparql-query.c"
4497 }
4498 #line 465 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4499 while (TRUE) {
4500 #line 4501 "tracker-sparql-query.c"
4501 TrackerSparqlTokenType _tmp29_ = 0;
4502 TrackerSparqlTokenType _tmp30_ = 0;
4503 #line 465 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4504 _tmp29_ = tracker_sparql_query_current (self);
4505 #line 465 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4506 if (!(_tmp29_ != TRACKER_SPARQL_TOKEN_TYPE_EOF)) {
4507 #line 465 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4508 break;
4509 #line 4510 "tracker-sparql-query.c"
4510 }
4511 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4512 _tmp30_ = tracker_sparql_query_current (self);
4513 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4514 switch (_tmp30_) {
4515 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4516 case TRACKER_SPARQL_TOKEN_TYPE_WITH:
4517 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4518 case TRACKER_SPARQL_TOKEN_TYPE_INSERT:
4519 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4520 case TRACKER_SPARQL_TOKEN_TYPE_DELETE:
4521 #line 4522 "tracker-sparql-query.c"
4522 {
4523 gboolean _tmp31_;
4524 #line 470 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4525 _tmp31_ = blank;
4526 #line 470 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4527 if (_tmp31_) {
4528 #line 4529 "tracker-sparql-query.c"
4529 GVariantBuilder* _tmp32_;
4530 GVariantBuilder* _tmp33_;
4531 GVariantBuilder* _tmp34_;
4532 #line 471 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4533 _tmp32_ = ublank_nodes;
4534 #line 471 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4535 g_variant_builder_open (_tmp32_, (const GVariantType*) "aa{ss}");
4536 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4537 _tmp33_ = ublank_nodes;
4538 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4539 tracker_sparql_query_execute_insert_or_delete (self, _tmp33_, &_inner_error_);
4540 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4541 if (_inner_error_ != NULL) {
4542 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4543 g_propagate_error (error, _inner_error_);
4544 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4545 _g_variant_builder_unref0 (ublank_nodes);
4546 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4547 _g_variant_unref0 (_result_);
4548 #line 472 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4549 return NULL;
4550 #line 4551 "tracker-sparql-query.c"
4551 }
4552 #line 473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4553 _tmp34_ = ublank_nodes;
4554 #line 473 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4555 g_variant_builder_close (_tmp34_);
4556 #line 4557 "tracker-sparql-query.c"
4557 } else {
4558 #line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4559 tracker_sparql_query_execute_insert_or_delete (self, NULL, &_inner_error_);
4560 #line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4561 if (_inner_error_ != NULL) {
4562 #line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4563 g_propagate_error (error, _inner_error_);
4564 #line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4565 _g_variant_builder_unref0 (ublank_nodes);
4566 #line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4567 _g_variant_unref0 (_result_);
4568 #line 475 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4569 return NULL;
4570 #line 4571 "tracker-sparql-query.c"
4571 }
4572 }
4573 #line 477 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4574 break;
4575 #line 4576 "tracker-sparql-query.c"
4576 }
4577 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4578 case TRACKER_SPARQL_TOKEN_TYPE_DROP:
4579 #line 4580 "tracker-sparql-query.c"
4580 {
4581 GError* _tmp35_ = NULL;
4582 #line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4583 _tmp35_ = tracker_sparql_query_get_internal_error (self, "DROP GRAPH is not supported");
4584 #line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4585 _inner_error_ = _tmp35_;
4586 #line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4587 g_propagate_error (error, _inner_error_);
4588 #line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4589 _g_variant_builder_unref0 (ublank_nodes);
4590 #line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4591 _g_variant_unref0 (_result_);
4592 #line 479 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4593 return NULL;
4594 #line 4595 "tracker-sparql-query.c"
4595 }
4596 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4597 case TRACKER_SPARQL_TOKEN_TYPE_SELECT:
4598 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4599 case TRACKER_SPARQL_TOKEN_TYPE_CONSTRUCT:
4600 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4601 case TRACKER_SPARQL_TOKEN_TYPE_DESCRIBE:
4602 #line 466 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4603 case TRACKER_SPARQL_TOKEN_TYPE_ASK:
4604 #line 4605 "tracker-sparql-query.c"
4605 {
4606 GError* _tmp36_ = NULL;
4607 #line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4608 _tmp36_ = tracker_sparql_query_get_error (self, "SELECT, CONSTRUCT, DESCRIBE, and ASK are not supported in update mode");
4609 #line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4610 _inner_error_ = _tmp36_;
4611 #line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4612 g_propagate_error (error, _inner_error_);
4613 #line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4614 _g_variant_builder_unref0 (ublank_nodes);
4615 #line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4616 _g_variant_unref0 (_result_);
4617 #line 484 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4618 return NULL;
4619 #line 4620 "tracker-sparql-query.c"
4620 }
4621 default:
4622 {
4623 GError* _tmp37_ = NULL;
4624 #line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4625 _tmp37_ = tracker_sparql_query_get_error (self, "expected INSERT or DELETE");
4626 #line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4627 _inner_error_ = _tmp37_;
4628 #line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4629 g_propagate_error (error, _inner_error_);
4630 #line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4631 _g_variant_builder_unref0 (ublank_nodes);
4632 #line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4633 _g_variant_unref0 (_result_);
4634 #line 486 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4635 return NULL;
4636 #line 4637 "tracker-sparql-query.c"
4637 }
4638 }
4639 #line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4640 tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_SEMICOLON, &_inner_error_);
4641 #line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4642 if (_inner_error_ != NULL) {
4643 #line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4644 g_propagate_error (error, _inner_error_);
4645 #line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4646 _g_variant_builder_unref0 (ublank_nodes);
4647 #line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4648 _g_variant_unref0 (_result_);
4649 #line 491 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4650 return NULL;
4651 #line 4652 "tracker-sparql-query.c"
4652 }
4653 }
4654 #line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4655 _tmp38_ = blank;
4656 #line 494 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4657 if (_tmp38_) {
4658 #line 4659 "tracker-sparql-query.c"
4659 GVariantBuilder* _tmp39_;
4660 GVariant* _tmp40_ = NULL;
4661 #line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4662 _tmp39_ = ublank_nodes;
4663 #line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4664 _tmp40_ = g_variant_builder_end (_tmp39_);
4665 #line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4666 g_variant_ref_sink (_tmp40_);
4667 #line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4668 _g_variant_unref0 (_result_);
4669 #line 495 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4670 _result_ = _tmp40_;
4671 #line 4672 "tracker-sparql-query.c"
4672 }
4673 #line 498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4674 result = _result_;
4675 #line 498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4676 _g_variant_builder_unref0 (ublank_nodes);
4677 #line 498 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4678 return result;
4679 #line 4680 "tracker-sparql-query.c"
4680 }
4681
4682
4683 static TrackerDBStatement* tracker_sparql_query_prepare_for_exec (TrackerSparqlQuery* self, const gchar* sql, GError** error) {
4684 TrackerDBStatement* result = NULL;
4685 TrackerDBInterface* _tmp0_ = NULL;
4686 TrackerDBInterface* _tmp1_;
4687 TrackerDBInterface* iface;
4688 TrackerDBStatementCacheType _tmp2_ = 0;
4689 gboolean _tmp3_;
4690 TrackerDBInterface* _tmp4_;
4691 TrackerDBStatementCacheType _tmp5_;
4692 const gchar* _tmp6_;
4693 TrackerDBStatement* _tmp7_ = NULL;
4694 TrackerDBStatement* stmt;
4695 gint i;
4696 GList* _tmp8_;
4697 GError * _inner_error_ = NULL;
4698 #line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4699 g_return_val_if_fail (self != NULL, NULL);
4700 #line 501 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4701 g_return_val_if_fail (sql != NULL, NULL);
4702 #line 502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4703 _tmp0_ = tracker_db_manager_get_db_interface ();
4704 #line 502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4705 _tmp1_ = _g_object_ref0 (_tmp0_);
4706 #line 502 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4707 iface = _tmp1_;
4708 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4709 _tmp3_ = self->priv->_no_cache;
4710 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4711 if (_tmp3_) {
4712 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4713 _tmp2_ = TRACKER_DB_STATEMENT_CACHE_TYPE_NONE;
4714 #line 4715 "tracker-sparql-query.c"
4715 } else {
4716 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4717 _tmp2_ = TRACKER_DB_STATEMENT_CACHE_TYPE_SELECT;
4718 #line 4719 "tracker-sparql-query.c"
4719 }
4720 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4721 _tmp4_ = iface;
4722 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4723 _tmp5_ = _tmp2_;
4724 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4725 _tmp6_ = sql;
4726 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4727 _tmp7_ = tracker_db_interface_create_statement (_tmp4_, _tmp5_, &_inner_error_, "%s", _tmp6_);
4728 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4729 stmt = _tmp7_;
4730 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4731 if (_inner_error_ != NULL) {
4732 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4733 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4734 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4735 g_propagate_error (error, _inner_error_);
4736 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4737 _g_object_unref0 (iface);
4738 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4739 return NULL;
4740 #line 4741 "tracker-sparql-query.c"
4741 } else {
4742 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4743 _g_object_unref0 (iface);
4744 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4745 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4746 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4747 g_clear_error (&_inner_error_);
4748 #line 503 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4749 return NULL;
4750 #line 4751 "tracker-sparql-query.c"
4751 }
4752 }
4753 #line 506 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4754 i = 0;
4755 #line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4756 _tmp8_ = self->bindings;
4757 #line 4758 "tracker-sparql-query.c"
4758 {
4759 GList* binding_collection = NULL;
4760 GList* binding_it = NULL;
4761 #line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4762 binding_collection = _tmp8_;
4763 #line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4764 for (binding_it = binding_collection; binding_it != NULL; binding_it = binding_it->next) {
4765 #line 4766 "tracker-sparql-query.c"
4766 TrackerSparqlLiteralBinding* _tmp9_;
4767 TrackerSparqlLiteralBinding* binding = NULL;
4768 #line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4769 _tmp9_ = _g_object_ref0 ((TrackerSparqlLiteralBinding*) binding_it->data);
4770 #line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4771 binding = _tmp9_;
4772 #line 4773 "tracker-sparql-query.c"
4773 {
4774 TrackerSparqlLiteralBinding* _tmp10_;
4775 TrackerPropertyType _tmp11_;
4776 gint _tmp64_;
4777 #line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4778 _tmp10_ = binding;
4779 #line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4780 _tmp11_ = ((TrackerSparqlDataBinding*) _tmp10_)->data_type;
4781 #line 508 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4782 if (_tmp11_ == TRACKER_PROPERTY_TYPE_BOOLEAN) {
4783 #line 4784 "tracker-sparql-query.c"
4784 gboolean _tmp12_ = FALSE;
4785 TrackerSparqlLiteralBinding* _tmp13_;
4786 const gchar* _tmp14_;
4787 gboolean _tmp17_;
4788 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4789 _tmp13_ = binding;
4790 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4791 _tmp14_ = _tmp13_->literal;
4792 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4793 if (g_strcmp0 (_tmp14_, "true") == 0) {
4794 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4795 _tmp12_ = TRUE;
4796 #line 4797 "tracker-sparql-query.c"
4797 } else {
4798 TrackerSparqlLiteralBinding* _tmp15_;
4799 const gchar* _tmp16_;
4800 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4801 _tmp15_ = binding;
4802 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4803 _tmp16_ = _tmp15_->literal;
4804 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4805 _tmp12_ = g_strcmp0 (_tmp16_, "1") == 0;
4806 #line 4807 "tracker-sparql-query.c"
4807 }
4808 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4809 _tmp17_ = _tmp12_;
4810 #line 509 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4811 if (_tmp17_) {
4812 #line 4813 "tracker-sparql-query.c"
4813 TrackerDBStatement* _tmp18_;
4814 gint _tmp19_;
4815 #line 510 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4816 _tmp18_ = stmt;
4817 #line 510 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4818 _tmp19_ = i;
4819 #line 510 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4820 tracker_db_statement_bind_int (_tmp18_, _tmp19_, 1);
4821 #line 4822 "tracker-sparql-query.c"
4822 } else {
4823 gboolean _tmp20_ = FALSE;
4824 TrackerSparqlLiteralBinding* _tmp21_;
4825 const gchar* _tmp22_;
4826 gboolean _tmp25_;
4827 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4828 _tmp21_ = binding;
4829 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4830 _tmp22_ = _tmp21_->literal;
4831 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4832 if (g_strcmp0 (_tmp22_, "false") == 0) {
4833 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4834 _tmp20_ = TRUE;
4835 #line 4836 "tracker-sparql-query.c"
4836 } else {
4837 TrackerSparqlLiteralBinding* _tmp23_;
4838 const gchar* _tmp24_;
4839 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4840 _tmp23_ = binding;
4841 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4842 _tmp24_ = _tmp23_->literal;
4843 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4844 _tmp20_ = g_strcmp0 (_tmp24_, "0") == 0;
4845 #line 4846 "tracker-sparql-query.c"
4846 }
4847 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4848 _tmp25_ = _tmp20_;
4849 #line 511 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4850 if (_tmp25_) {
4851 #line 4852 "tracker-sparql-query.c"
4852 TrackerDBStatement* _tmp26_;
4853 gint _tmp27_;
4854 #line 512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4855 _tmp26_ = stmt;
4856 #line 512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4857 _tmp27_ = i;
4858 #line 512 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4859 tracker_db_statement_bind_int (_tmp26_, _tmp27_, 0);
4860 #line 4861 "tracker-sparql-query.c"
4861 } else {
4862 TrackerSparqlLiteralBinding* _tmp28_;
4863 const gchar* _tmp29_;
4864 gchar* _tmp30_ = NULL;
4865 gchar* _tmp31_;
4866 GError* _tmp32_;
4867 GError* _tmp33_;
4868 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4869 _tmp28_ = binding;
4870 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4871 _tmp29_ = _tmp28_->literal;
4872 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4873 _tmp30_ = g_strdup_printf ("`%s' is not a valid boolean", _tmp29_);
4874 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4875 _tmp31_ = _tmp30_;
4876 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4877 _tmp32_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_TYPE, _tmp31_);
4878 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4879 _tmp33_ = _tmp32_;
4880 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4881 _g_free0 (_tmp31_);
4882 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4883 _inner_error_ = _tmp33_;
4884 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4885 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4886 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4887 g_propagate_error (error, _inner_error_);
4888 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4889 _g_object_unref0 (binding);
4890 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4891 _g_object_unref0 (stmt);
4892 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4893 _g_object_unref0 (iface);
4894 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4895 return NULL;
4896 #line 4897 "tracker-sparql-query.c"
4897 } else {
4898 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4899 _g_object_unref0 (binding);
4900 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4901 _g_object_unref0 (stmt);
4902 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4903 _g_object_unref0 (iface);
4904 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4905 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4906 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4907 g_clear_error (&_inner_error_);
4908 #line 514 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4909 return NULL;
4910 #line 4911 "tracker-sparql-query.c"
4911 }
4912 }
4913 }
4914 } else {
4915 TrackerSparqlLiteralBinding* _tmp34_;
4916 TrackerPropertyType _tmp35_;
4917 #line 516 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4918 _tmp34_ = binding;
4919 #line 516 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4920 _tmp35_ = ((TrackerSparqlDataBinding*) _tmp34_)->data_type;
4921 #line 516 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4922 if (_tmp35_ == TRACKER_PROPERTY_TYPE_DATE) {
4923 #line 4924 "tracker-sparql-query.c"
4924 TrackerSparqlLiteralBinding* _tmp36_;
4925 const gchar* _tmp37_;
4926 gchar* _tmp38_;
4927 gchar* _tmp39_;
4928 gdouble _tmp40_ = 0.0;
4929 gdouble _tmp41_;
4930 gdouble _tmp42_;
4931 TrackerDBStatement* _tmp43_;
4932 gint _tmp44_;
4933 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4934 _tmp36_ = binding;
4935 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4936 _tmp37_ = _tmp36_->literal;
4937 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4938 _tmp38_ = g_strconcat (_tmp37_, "T00:00:00Z", NULL);
4939 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4940 _tmp39_ = _tmp38_;
4941 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4942 _tmp40_ = tracker_string_to_date (_tmp39_, NULL, &_inner_error_);
4943 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4944 _tmp41_ = _tmp40_;
4945 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4946 _g_free0 (_tmp39_);
4947 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4948 _tmp42_ = _tmp41_;
4949 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4950 if (_inner_error_ != NULL) {
4951 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4952 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
4953 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4954 g_propagate_error (error, _inner_error_);
4955 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4956 _g_object_unref0 (binding);
4957 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4958 _g_object_unref0 (stmt);
4959 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4960 _g_object_unref0 (iface);
4961 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4962 return NULL;
4963 #line 4964 "tracker-sparql-query.c"
4964 } else {
4965 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4966 _g_object_unref0 (binding);
4967 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4968 _g_object_unref0 (stmt);
4969 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4970 _g_object_unref0 (iface);
4971 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4972 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
4973 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4974 g_clear_error (&_inner_error_);
4975 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4976 return NULL;
4977 #line 4978 "tracker-sparql-query.c"
4978 }
4979 }
4980 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4981 _tmp43_ = stmt;
4982 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4983 _tmp44_ = i;
4984 #line 517 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4985 tracker_db_statement_bind_int (_tmp43_, _tmp44_, (gint) _tmp42_);
4986 #line 4987 "tracker-sparql-query.c"
4987 } else {
4988 TrackerSparqlLiteralBinding* _tmp45_;
4989 TrackerPropertyType _tmp46_;
4990 #line 518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4991 _tmp45_ = binding;
4992 #line 518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4993 _tmp46_ = ((TrackerSparqlDataBinding*) _tmp45_)->data_type;
4994 #line 518 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
4995 if (_tmp46_ == TRACKER_PROPERTY_TYPE_DATETIME) {
4996 #line 4997 "tracker-sparql-query.c"
4997 TrackerSparqlLiteralBinding* _tmp47_;
4998 const gchar* _tmp48_;
4999 gdouble _tmp49_ = 0.0;
5000 gdouble _tmp50_;
5001 TrackerDBStatement* _tmp51_;
5002 gint _tmp52_;
5003 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5004 _tmp47_ = binding;
5005 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5006 _tmp48_ = _tmp47_->literal;
5007 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5008 _tmp49_ = tracker_string_to_date (_tmp48_, NULL, &_inner_error_);
5009 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5010 _tmp50_ = _tmp49_;
5011 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5012 if (_inner_error_ != NULL) {
5013 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5014 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5015 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5016 g_propagate_error (error, _inner_error_);
5017 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5018 _g_object_unref0 (binding);
5019 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5020 _g_object_unref0 (stmt);
5021 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5022 _g_object_unref0 (iface);
5023 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5024 return NULL;
5025 #line 5026 "tracker-sparql-query.c"
5026 } else {
5027 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5028 _g_object_unref0 (binding);
5029 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5030 _g_object_unref0 (stmt);
5031 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5032 _g_object_unref0 (iface);
5033 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5034 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5035 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5036 g_clear_error (&_inner_error_);
5037 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5038 return NULL;
5039 #line 5040 "tracker-sparql-query.c"
5040 }
5041 }
5042 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5043 _tmp51_ = stmt;
5044 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5045 _tmp52_ = i;
5046 #line 519 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5047 tracker_db_statement_bind_double (_tmp51_, _tmp52_, _tmp50_);
5048 #line 5049 "tracker-sparql-query.c"
5049 } else {
5050 TrackerSparqlLiteralBinding* _tmp53_;
5051 TrackerPropertyType _tmp54_;
5052 #line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5053 _tmp53_ = binding;
5054 #line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5055 _tmp54_ = ((TrackerSparqlDataBinding*) _tmp53_)->data_type;
5056 #line 520 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5057 if (_tmp54_ == TRACKER_PROPERTY_TYPE_INTEGER) {
5058 #line 5059 "tracker-sparql-query.c"
5059 TrackerDBStatement* _tmp55_;
5060 gint _tmp56_;
5061 TrackerSparqlLiteralBinding* _tmp57_;
5062 const gchar* _tmp58_;
5063 gint _tmp59_ = 0;
5064 #line 521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5065 _tmp55_ = stmt;
5066 #line 521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5067 _tmp56_ = i;
5068 #line 521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5069 _tmp57_ = binding;
5070 #line 521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5071 _tmp58_ = _tmp57_->literal;
5072 #line 521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5073 _tmp59_ = atoi (_tmp58_);
5074 #line 521 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5075 tracker_db_statement_bind_int (_tmp55_, _tmp56_, _tmp59_);
5076 #line 5077 "tracker-sparql-query.c"
5077 } else {
5078 TrackerDBStatement* _tmp60_;
5079 gint _tmp61_;
5080 TrackerSparqlLiteralBinding* _tmp62_;
5081 const gchar* _tmp63_;
5082 #line 523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5083 _tmp60_ = stmt;
5084 #line 523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5085 _tmp61_ = i;
5086 #line 523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5087 _tmp62_ = binding;
5088 #line 523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5089 _tmp63_ = _tmp62_->literal;
5090 #line 523 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5091 tracker_db_statement_bind_text (_tmp60_, _tmp61_, _tmp63_);
5092 #line 5093 "tracker-sparql-query.c"
5093 }
5094 }
5095 }
5096 }
5097 #line 525 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5098 _tmp64_ = i;
5099 #line 525 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5100 i = _tmp64_ + 1;
5101 #line 507 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5102 _g_object_unref0 (binding);
5103 #line 5104 "tracker-sparql-query.c"
5104 }
5105 }
5106 }
5107 #line 528 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5108 result = stmt;
5109 #line 528 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5110 _g_object_unref0 (iface);
5111 #line 528 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5112 return result;
5113 #line 5114 "tracker-sparql-query.c"
5114 }
5115
5116
5117 static TrackerDBCursor* tracker_sparql_query_exec_sql_cursor (TrackerSparqlQuery* self, const gchar* sql, TrackerPropertyType* types, int types_length1, gchar** variable_names, int variable_names_length1, gboolean threadsafe, GError** error) {
5118 TrackerDBCursor* result = NULL;
5119 const gchar* _tmp0_;
5120 TrackerDBStatement* _tmp1_ = NULL;
5121 TrackerDBStatement* stmt;
5122 TrackerDBStatement* _tmp2_;
5123 TrackerPropertyType* _tmp3_;
5124 gint _tmp3__length1;
5125 gchar** _tmp4_;
5126 gint _tmp4__length1;
5127 gboolean _tmp5_;
5128 TrackerDBCursor* _tmp6_ = NULL;
5129 TrackerDBCursor* _tmp7_;
5130 GError * _inner_error_ = NULL;
5131 #line 531 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5132 g_return_val_if_fail (self != NULL, NULL);
5133 #line 531 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5134 g_return_val_if_fail (sql != NULL, NULL);
5135 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5136 _tmp0_ = sql;
5137 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5138 _tmp1_ = tracker_sparql_query_prepare_for_exec (self, _tmp0_, &_inner_error_);
5139 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5140 stmt = _tmp1_;
5141 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5142 if (_inner_error_ != NULL) {
5143 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5144 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5145 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5146 g_propagate_error (error, _inner_error_);
5147 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5148 return NULL;
5149 #line 5150 "tracker-sparql-query.c"
5150 } else {
5151 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5152 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5153 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5154 g_clear_error (&_inner_error_);
5155 #line 532 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5156 return NULL;
5157 #line 5158 "tracker-sparql-query.c"
5158 }
5159 }
5160 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5161 _tmp2_ = stmt;
5162 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5163 _tmp3_ = types;
5164 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5165 _tmp3__length1 = types_length1;
5166 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5167 _tmp4_ = variable_names;
5168 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5169 _tmp4__length1 = variable_names_length1;
5170 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5171 _tmp5_ = threadsafe;
5172 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5173 _tmp6_ = tracker_db_statement_start_sparql_cursor (_tmp2_, _tmp3_, _tmp3__length1, _tmp4_, _tmp4__length1, _tmp5_, &_inner_error_);
5174 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5175 _tmp7_ = _tmp6_;
5176 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5177 if (_inner_error_ != NULL) {
5178 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5179 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5180 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5181 g_propagate_error (error, _inner_error_);
5182 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5183 _g_object_unref0 (stmt);
5184 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5185 return NULL;
5186 #line 5187 "tracker-sparql-query.c"
5187 } else {
5188 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5189 _g_object_unref0 (stmt);
5190 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5191 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5192 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5193 g_clear_error (&_inner_error_);
5194 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5195 return NULL;
5196 #line 5197 "tracker-sparql-query.c"
5197 }
5198 }
5199 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5200 result = _tmp7_;
5201 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5202 _g_object_unref0 (stmt);
5203 #line 534 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5204 return result;
5205 #line 5206 "tracker-sparql-query.c"
5206 }
5207
5208
5209 static gchar* tracker_sparql_query_get_select_query (TrackerSparqlQuery* self, TrackerSparqlSelectContext** context, GError** error) {
5210 TrackerSparqlSelectContext* _vala_context = NULL;
5211 gchar* result = NULL;
5212 GString* _tmp0_;
5213 GString* sql;
5214 TrackerSparqlPattern* _tmp1_;
5215 GString* _tmp2_;
5216 TrackerSparqlSelectContext* _tmp3_ = NULL;
5217 TrackerSparqlSelectContext* _tmp4_;
5218 GString* _tmp5_;
5219 const gchar* _tmp6_;
5220 gchar* _tmp7_;
5221 GError * _inner_error_ = NULL;
5222 #line 537 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5223 g_return_val_if_fail (self != NULL, NULL);
5224 #line 541 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5225 _tmp0_ = g_string_new ("");
5226 #line 541 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5227 sql = _tmp0_;
5228 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5229 _tmp1_ = self->pattern;
5230 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5231 _tmp2_ = sql;
5232 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5233 _tmp3_ = tracker_sparql_pattern_translate_select (_tmp1_, _tmp2_, FALSE, FALSE, &_inner_error_);
5234 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5235 _tmp4_ = _tmp3_;
5236 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5237 if (_inner_error_ != NULL) {
5238 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5239 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5240 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5241 g_propagate_error (error, _inner_error_);
5242 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5243 _g_string_free0 (sql);
5244 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5245 return NULL;
5246 #line 5247 "tracker-sparql-query.c"
5247 } else {
5248 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5249 _g_string_free0 (sql);
5250 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5251 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5252 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5253 g_clear_error (&_inner_error_);
5254 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5255 return NULL;
5256 #line 5257 "tracker-sparql-query.c"
5257 }
5258 }
5259 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5260 _tracker_sparql_context_unref0 (_vala_context);
5261 #line 542 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5262 _vala_context = _tmp4_;
5263 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5264 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_EOF, &_inner_error_);
5265 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5266 if (_inner_error_ != NULL) {
5267 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5268 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5269 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5270 g_propagate_error (error, _inner_error_);
5271 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5272 _g_string_free0 (sql);
5273 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5274 return NULL;
5275 #line 5276 "tracker-sparql-query.c"
5276 } else {
5277 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5278 _g_string_free0 (sql);
5279 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5280 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5281 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5282 g_clear_error (&_inner_error_);
5283 #line 544 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5284 return NULL;
5285 #line 5286 "tracker-sparql-query.c"
5286 }
5287 }
5288 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5289 _tmp5_ = sql;
5290 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5291 _tmp6_ = _tmp5_->str;
5292 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5293 _tmp7_ = g_strdup (_tmp6_);
5294 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5295 result = _tmp7_;
5296 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5297 _g_string_free0 (sql);
5298 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5299 if (context) {
5300 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5301 *context = _vala_context;
5302 #line 5303 "tracker-sparql-query.c"
5303 } else {
5304 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5305 _tracker_sparql_context_unref0 (_vala_context);
5306 #line 5307 "tracker-sparql-query.c"
5307 }
5308 #line 546 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5309 return result;
5310 #line 5311 "tracker-sparql-query.c"
5311 }
5312
5313
5314 static TrackerDBCursor* tracker_sparql_query_execute_select_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error) {
5315 TrackerDBCursor* result = NULL;
5316 TrackerSparqlSelectContext* context = NULL;
5317 TrackerSparqlSelectContext* _tmp0_ = NULL;
5318 gchar* _tmp1_ = NULL;
5319 gchar* sql;
5320 const gchar* _tmp2_;
5321 TrackerSparqlSelectContext* _tmp3_;
5322 TrackerPropertyType* _tmp4_;
5323 gint _tmp4__length1;
5324 TrackerSparqlSelectContext* _tmp5_;
5325 gchar** _tmp6_;
5326 gint _tmp6__length1;
5327 TrackerDBCursor* _tmp7_ = NULL;
5328 TrackerDBCursor* _tmp8_;
5329 GError * _inner_error_ = NULL;
5330 #line 549 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5331 g_return_val_if_fail (self != NULL, NULL);
5332 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5333 _tmp1_ = tracker_sparql_query_get_select_query (self, &_tmp0_, &_inner_error_);
5334 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5335 _tracker_sparql_context_unref0 (context);
5336 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5337 context = _tmp0_;
5338 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5339 sql = _tmp1_;
5340 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5341 if (_inner_error_ != NULL) {
5342 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5343 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5344 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5345 g_propagate_error (error, _inner_error_);
5346 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5347 _tracker_sparql_context_unref0 (context);
5348 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5349 return NULL;
5350 #line 5351 "tracker-sparql-query.c"
5351 } else {
5352 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5353 _tracker_sparql_context_unref0 (context);
5354 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5355 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5356 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5357 g_clear_error (&_inner_error_);
5358 #line 551 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5359 return NULL;
5360 #line 5361 "tracker-sparql-query.c"
5361 }
5362 }
5363 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5364 _tmp2_ = sql;
5365 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5366 _tmp3_ = context;
5367 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5368 _tmp4_ = _tmp3_->types;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
5369 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5370 _tmp4__length1 = _tmp3_->types_length1;
5371 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5372 _tmp5_ = context;
5373 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5374 _tmp6_ = _tmp5_->variable_names;
5375 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5376 _tmp6__length1 = _tmp5_->variable_names_length1;
5377 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5378 _tmp7_ = tracker_sparql_query_exec_sql_cursor (self, _tmp2_, _tmp4_, _tmp4__length1, _tmp6_, _tmp6__length1, TRUE, &_inner_error_);
5379 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5380 _tmp8_ = _tmp7_;
5381 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5382 if (_inner_error_ != NULL) {
5383 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5384 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5385 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5386 g_propagate_error (error, _inner_error_);
5387 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5388 _g_free0 (sql);
5389 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5390 _tracker_sparql_context_unref0 (context);
5391 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5392 return NULL;
5393 #line 5394 "tracker-sparql-query.c"
5394 } else {
5395 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5396 _g_free0 (sql);
5397 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5398 _tracker_sparql_context_unref0 (context);
5399 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5400 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5401 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5402 g_clear_error (&_inner_error_);
5403 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5404 return NULL;
5405 #line 5406 "tracker-sparql-query.c"
5406 }
5407 }
5408 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5409 result = _tmp8_;
5410 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5411 _g_free0 (sql);
5412 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5413 _tracker_sparql_context_unref0 (context);
5414 #line 553 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5415 return result;
5416 #line 5417 "tracker-sparql-query.c"
5417 }
5418
5419
5420 static gchar* tracker_sparql_query_get_ask_query (TrackerSparqlQuery* self, GError** error) {
5421 gchar* result = NULL;
5422 GString* _tmp0_;
5423 GString* pattern_sql;
5424 GString* _tmp1_;
5425 GString* sql;
5426 GString* _tmp2_;
5427 TrackerSparqlPattern* _tmp3_;
5428 GString* _tmp4_;
5429 TrackerSparqlContext* _tmp5_ = NULL;
5430 TrackerSparqlContext* _tmp6_;
5431 GString* _tmp7_;
5432 GString* _tmp8_;
5433 const gchar* _tmp9_;
5434 GString* _tmp10_;
5435 gboolean _tmp11_ = FALSE;
5436 gboolean _tmp12_ = FALSE;
5437 gboolean _tmp13_ = FALSE;
5438 gboolean _tmp14_ = FALSE;
5439 gboolean _tmp15_;
5440 gboolean _tmp18_;
5441 gboolean _tmp21_;
5442 gboolean _tmp24_;
5443 TrackerSparqlContext* _tmp31_;
5444 TrackerSparqlContext* _tmp32_;
5445 TrackerSparqlContext* _tmp33_;
5446 GString* _tmp34_;
5447 const gchar* _tmp35_;
5448 gchar* _tmp36_;
5449 GError * _inner_error_ = NULL;
5450 #line 556 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5451 g_return_val_if_fail (self != NULL, NULL);
5452 #line 559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5453 _tmp0_ = g_string_new ("");
5454 #line 559 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5455 pattern_sql = _tmp0_;
5456 #line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5457 _tmp1_ = g_string_new ("");
5458 #line 562 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5459 sql = _tmp1_;
5460 #line 563 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5461 _tmp2_ = sql;
5462 #line 563 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5463 g_string_append (_tmp2_, "SELECT CASE EXISTS ( ");
5464 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5465 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_ASK, &_inner_error_);
5466 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5467 if (_inner_error_ != NULL) {
5468 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5469 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5470 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5471 g_propagate_error (error, _inner_error_);
5472 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5473 _g_string_free0 (sql);
5474 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5475 _g_string_free0 (pattern_sql);
5476 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5477 return NULL;
5478 #line 5479 "tracker-sparql-query.c"
5479 } else {
5480 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5481 _g_string_free0 (sql);
5482 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5483 _g_string_free0 (pattern_sql);
5484 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5485 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5486 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5487 g_clear_error (&_inner_error_);
5488 #line 565 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5489 return NULL;
5490 #line 5491 "tracker-sparql-query.c"
5491 }
5492 }
5493 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5494 tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_WHERE, &_inner_error_);
5495 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5496 if (_inner_error_ != NULL) {
5497 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5498 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5499 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5500 g_propagate_error (error, _inner_error_);
5501 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5502 _g_string_free0 (sql);
5503 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5504 _g_string_free0 (pattern_sql);
5505 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5506 return NULL;
5507 #line 5508 "tracker-sparql-query.c"
5508 } else {
5509 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5510 _g_string_free0 (sql);
5511 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5512 _g_string_free0 (pattern_sql);
5513 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5514 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5515 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5516 g_clear_error (&_inner_error_);
5517 #line 567 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5518 return NULL;
5519 #line 5520 "tracker-sparql-query.c"
5520 }
5521 }
5522 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5523 _tmp3_ = self->pattern;
5524 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5525 _tmp4_ = pattern_sql;
5526 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5527 _tmp5_ = tracker_sparql_pattern_translate_group_graph_pattern (_tmp3_, _tmp4_, &_inner_error_);
5528 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5529 _tmp6_ = _tmp5_;
5530 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5531 if (_inner_error_ != NULL) {
5532 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5533 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5534 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5535 g_propagate_error (error, _inner_error_);
5536 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5537 _g_string_free0 (sql);
5538 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5539 _g_string_free0 (pattern_sql);
5540 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5541 return NULL;
5542 #line 5543 "tracker-sparql-query.c"
5543 } else {
5544 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5545 _g_string_free0 (sql);
5546 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5547 _g_string_free0 (pattern_sql);
5548 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5549 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5550 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5551 g_clear_error (&_inner_error_);
5552 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5553 return NULL;
5554 #line 5555 "tracker-sparql-query.c"
5555 }
5556 }
5557 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5558 _tracker_sparql_context_unref0 (self->context);
5559 #line 569 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5560 self->context = _tmp6_;
5561 #line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5562 _tmp7_ = sql;
5563 #line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5564 _tmp8_ = pattern_sql;
5565 #line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5566 _tmp9_ = _tmp8_->str;
5567 #line 572 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5568 g_string_append (_tmp7_, _tmp9_);
5569 #line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5570 _tmp10_ = sql;
5571 #line 573 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5572 g_string_append (_tmp10_, " ) WHEN 1 THEN 'true' WHEN 0 THEN 'false' ELSE NULL END");
5573 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5574 _tmp14_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_GROUP, &_inner_error_);
5575 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5576 _tmp15_ = _tmp14_;
5577 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5578 if (_inner_error_ != NULL) {
5579 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5580 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5581 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5582 g_propagate_error (error, _inner_error_);
5583 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5584 _g_string_free0 (sql);
5585 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5586 _g_string_free0 (pattern_sql);
5587 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5588 return NULL;
5589 #line 5590 "tracker-sparql-query.c"
5590 } else {
5591 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5592 _g_string_free0 (sql);
5593 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5594 _g_string_free0 (pattern_sql);
5595 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5596 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5597 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5598 g_clear_error (&_inner_error_);
5599 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5600 return NULL;
5601 #line 5602 "tracker-sparql-query.c"
5602 }
5603 }
5604 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5605 if (_tmp15_) {
5606 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5607 _tmp13_ = TRUE;
5608 #line 5609 "tracker-sparql-query.c"
5609 } else {
5610 gboolean _tmp16_ = FALSE;
5611 gboolean _tmp17_;
5612 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5613 _tmp16_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_ORDER, &_inner_error_);
5614 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5615 _tmp17_ = _tmp16_;
5616 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5617 if (_inner_error_ != NULL) {
5618 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5619 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5620 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5621 g_propagate_error (error, _inner_error_);
5622 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5623 _g_string_free0 (sql);
5624 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5625 _g_string_free0 (pattern_sql);
5626 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5627 return NULL;
5628 #line 5629 "tracker-sparql-query.c"
5629 } else {
5630 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5631 _g_string_free0 (sql);
5632 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5633 _g_string_free0 (pattern_sql);
5634 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5635 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5636 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5637 g_clear_error (&_inner_error_);
5638 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5639 return NULL;
5640 #line 5641 "tracker-sparql-query.c"
5641 }
5642 }
5643 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5644 _tmp13_ = _tmp17_;
5645 #line 5646 "tracker-sparql-query.c"
5646 }
5647 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5648 _tmp18_ = _tmp13_;
5649 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5650 if (_tmp18_) {
5651 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5652 _tmp12_ = TRUE;
5653 #line 5654 "tracker-sparql-query.c"
5654 } else {
5655 gboolean _tmp19_ = FALSE;
5656 gboolean _tmp20_;
5657 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5658 _tmp19_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OFFSET, &_inner_error_);
5659 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5660 _tmp20_ = _tmp19_;
5661 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5662 if (_inner_error_ != NULL) {
5663 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5664 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5665 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5666 g_propagate_error (error, _inner_error_);
5667 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5668 _g_string_free0 (sql);
5669 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5670 _g_string_free0 (pattern_sql);
5671 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5672 return NULL;
5673 #line 5674 "tracker-sparql-query.c"
5674 } else {
5675 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5676 _g_string_free0 (sql);
5677 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5678 _g_string_free0 (pattern_sql);
5679 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5680 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5681 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5682 g_clear_error (&_inner_error_);
5683 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5684 return NULL;
5685 #line 5686 "tracker-sparql-query.c"
5686 }
5687 }
5688 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5689 _tmp12_ = _tmp20_;
5690 #line 5691 "tracker-sparql-query.c"
5691 }
5692 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5693 _tmp21_ = _tmp12_;
5694 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5695 if (_tmp21_) {
5696 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5697 _tmp11_ = TRUE;
5698 #line 5699 "tracker-sparql-query.c"
5699 } else {
5700 gboolean _tmp22_ = FALSE;
5701 gboolean _tmp23_;
5702 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5703 _tmp22_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_LIMIT, &_inner_error_);
5704 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5705 _tmp23_ = _tmp22_;
5706 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5707 if (_inner_error_ != NULL) {
5708 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5709 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5710 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5711 g_propagate_error (error, _inner_error_);
5712 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5713 _g_string_free0 (sql);
5714 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5715 _g_string_free0 (pattern_sql);
5716 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5717 return NULL;
5718 #line 5719 "tracker-sparql-query.c"
5719 } else {
5720 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5721 _g_string_free0 (sql);
5722 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5723 _g_string_free0 (pattern_sql);
5724 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5725 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5726 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5727 g_clear_error (&_inner_error_);
5728 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5729 return NULL;
5730 #line 5731 "tracker-sparql-query.c"
5731 }
5732 }
5733 #line 576 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5734 _tmp11_ = _tmp23_;
5735 #line 5736 "tracker-sparql-query.c"
5736 }
5737 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5738 _tmp24_ = _tmp11_;
5739 #line 575 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5740 if (_tmp24_) {
5741 #line 5742 "tracker-sparql-query.c"
5742 TrackerSparqlTokenType _tmp25_ = 0;
5743 const gchar* _tmp26_ = NULL;
5744 gchar* _tmp27_ = NULL;
5745 gchar* _tmp28_;
5746 GError* _tmp29_ = NULL;
5747 GError* _tmp30_;
5748 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5749 _tmp25_ = tracker_sparql_query_last (self);
5750 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5751 _tmp26_ = tracker_sparql_token_type_to_string (_tmp25_);
5752 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5753 _tmp27_ = g_strdup_printf ("invalid use of %s in ASK", _tmp26_);
5754 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5755 _tmp28_ = _tmp27_;
5756 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5757 _tmp29_ = tracker_sparql_query_get_error (self, _tmp28_);
5758 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5759 _tmp30_ = _tmp29_;
5760 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5761 _g_free0 (_tmp28_);
5762 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5763 _inner_error_ = _tmp30_;
5764 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5765 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5766 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5767 g_propagate_error (error, _inner_error_);
5768 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5769 _g_string_free0 (sql);
5770 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5771 _g_string_free0 (pattern_sql);
5772 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5773 return NULL;
5774 #line 5775 "tracker-sparql-query.c"
5775 } else {
5776 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5777 _g_string_free0 (sql);
5778 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5779 _g_string_free0 (pattern_sql);
5780 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5781 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5782 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5783 g_clear_error (&_inner_error_);
5784 #line 577 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5785 return NULL;
5786 #line 5787 "tracker-sparql-query.c"
5787 }
5788 }
5789 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5790 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_EOF, &_inner_error_);
5791 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5792 if (_inner_error_ != NULL) {
5793 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5794 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5795 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5796 g_propagate_error (error, _inner_error_);
5797 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5798 _g_string_free0 (sql);
5799 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5800 _g_string_free0 (pattern_sql);
5801 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5802 return NULL;
5803 #line 5804 "tracker-sparql-query.c"
5804 } else {
5805 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5806 _g_string_free0 (sql);
5807 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5808 _g_string_free0 (pattern_sql);
5809 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5810 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5811 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5812 g_clear_error (&_inner_error_);
5813 #line 580 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5814 return NULL;
5815 #line 5816 "tracker-sparql-query.c"
5816 }
5817 }
5818 #line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5819 _tmp31_ = self->context;
5820 #line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5821 _tmp32_ = _tmp31_->parent_context;
5822 #line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5823 _tmp33_ = _tracker_sparql_context_ref0 (_tmp32_);
5824 #line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5825 _tracker_sparql_context_unref0 (self->context);
5826 #line 582 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5827 self->context = _tmp33_;
5828 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5829 _tmp34_ = sql;
5830 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5831 _tmp35_ = _tmp34_->str;
5832 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5833 _tmp36_ = g_strdup (_tmp35_);
5834 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5835 result = _tmp36_;
5836 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5837 _g_string_free0 (sql);
5838 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5839 _g_string_free0 (pattern_sql);
5840 #line 584 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5841 return result;
5842 #line 5843 "tracker-sparql-query.c"
5843 }
5844
5845
5846 static TrackerDBCursor* tracker_sparql_query_execute_ask_cursor (TrackerSparqlQuery* self, gboolean threadsafe, GError** error) {
5847 TrackerDBCursor* result = NULL;
5848 gchar* _tmp0_ = NULL;
5849 gchar* _tmp1_;
5850 gchar* _tmp2_;
5851 TrackerPropertyType* _tmp3_ = NULL;
5852 TrackerPropertyType* _tmp4_;
5853 gint _tmp4__length1;
(emitted by gcc) 5854 gchar* _tmp5_;
5855 gchar** _tmp6_ = NULL;
5856 gchar** _tmp7_;
5857 gint _tmp7__length1;
5858 TrackerDBCursor* _tmp8_ = NULL;
5859 TrackerDBCursor* _tmp9_;
5860 TrackerDBCursor* _tmp10_;
5861 GError * _inner_error_ = NULL;
5862 #line 587 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5863 g_return_val_if_fail (self != NULL, NULL);
5864 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5865 _tmp0_ = tracker_sparql_query_get_ask_query (self, &_inner_error_);
5866 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5867 _tmp1_ = _tmp0_;
5868 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5869 if (_inner_error_ != NULL) {
5870 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5871 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5872 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5873 g_propagate_error (error, _inner_error_);
5874 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5875 return NULL;
5876 #line 5877 "tracker-sparql-query.c"
5877 } else {
5878 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5879 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5880 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5881 g_clear_error (&_inner_error_);
5882 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5883 return NULL;
5884 #line 5885 "tracker-sparql-query.c"
5885 }
5886 }
5887 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5888 _tmp2_ = _tmp1_;
5889 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5890 _tmp3_ = g_new0 (TrackerPropertyType, 1);
5891 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5892 _tmp3_[0] = TRACKER_PROPERTY_TYPE_BOOLEAN;
5893 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5894 _tmp4_ = _tmp3_;
5895 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5896 _tmp4__length1 = 1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
5897 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5898 _tmp5_ = g_strdup ("result");
5899 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5900 _tmp6_ = g_new0 (gchar*, 1 + 1);
5901 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5902 _tmp6_[0] = _tmp5_;
5903 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5904 _tmp7_ = _tmp6_;
5905 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5906 _tmp7__length1 = 1;
5907 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5908 _tmp8_ = tracker_sparql_query_exec_sql_cursor (self, _tmp2_, _tmp4_, 1, _tmp7_, 1, TRUE, &_inner_error_);
5909 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5910 _tmp9_ = _tmp8_;
5911 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5912 _tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_free), NULL);
5913 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5914 _tmp4_ = (g_free (_tmp4_), NULL);
5915 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5916 _g_free0 (_tmp2_);
5917 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5918 _tmp10_ = _tmp9_;
5919 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5920 if (_inner_error_ != NULL) {
5921 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5922 if (((_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) || (_inner_error_->domain == TRACKER_SPARQL_ERROR)) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
5923 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5924 g_propagate_error (error, _inner_error_);
5925 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5926 return NULL;
5927 #line 5928 "tracker-sparql-query.c"
5928 } else {
5929 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5930 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5931 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5932 g_clear_error (&_inner_error_);
5933 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5934 return NULL;
5935 #line 5936 "tracker-sparql-query.c"
5936 }
5937 }
5938 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5939 result = _tmp10_;
5940 #line 588 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5941 return result;
5942 #line 5943 "tracker-sparql-query.c"
5943 }
5944
5945
5946 static void tracker_sparql_query_parse_from_or_into_param (TrackerSparqlQuery* self, GError** error) {
5947 gboolean _tmp0_ = FALSE;
5948 gboolean _tmp1_;
5949 GError * _inner_error_ = NULL;
5950 #line 591 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5951 g_return_if_fail (self != NULL);
5952 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5953 _tmp0_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_IRI_REF, &_inner_error_);
5954 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5955 _tmp1_ = _tmp0_;
5956 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5957 if (_inner_error_ != NULL) {
5958 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5959 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
5960 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5961 g_propagate_error (error, _inner_error_);
5962 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5963 return;
5964 #line 5965 "tracker-sparql-query.c"
5965 } else {
5966 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5967 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
5968 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5969 g_clear_error (&_inner_error_);
5970 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5971 return;
5972 #line 5973 "tracker-sparql-query.c"
5973 }
5974 }
5975 #line 592 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5976 if (_tmp1_) {
5977 #line 5978 "tracker-sparql-query.c"
5978 gchar* _tmp2_ = NULL;
5979 #line 593 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5980 _tmp2_ = tracker_sparql_query_get_last_string (self, 1);
5981 #line 593 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5982 _g_free0 (self->priv->current_graph);
5983 #line 593 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5984 self->priv->current_graph = _tmp2_;
5985 #line 5986 "tracker-sparql-query.c"
5986 } else {
5987 gboolean _tmp3_ = FALSE;
5988 gboolean _tmp4_;
5989 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5990 _tmp3_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX, &_inner_error_);
5991 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5992 _tmp4_ = _tmp3_;
5993 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5994 if (_inner_error_ != NULL) {
5995 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5996 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
5997 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
5998 g_propagate_error (error, _inner_error_);
5999 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6000 return;
6001 #line 6002 "tracker-sparql-query.c"
6002 } else {
6003 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6004 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6005 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6006 g_clear_error (&_inner_error_);
6007 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6008 return;
6009 #line 6010 "tracker-sparql-query.c"
6010 }
6011 }
6012 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6013 if (_tmp4_) {
6014 #line 6015 "tracker-sparql-query.c"
6015 gchar* _tmp5_ = NULL;
6016 gchar* ns;
6017 const gchar* _tmp6_;
6018 gchar* _tmp7_ = NULL;
6019 gchar* _tmp8_;
6020 gchar* _tmp9_ = NULL;
6021 gchar* _tmp10_;
6022 gchar* _tmp11_ = NULL;
6023 gchar* _tmp12_;
6024 gchar* _tmp13_;
6025 #line 595 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6026 _tmp5_ = tracker_sparql_query_get_last_string (self, 0);
6027 #line 595 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6028 ns = _tmp5_;
6029 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6030 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
6031 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6032 if (_inner_error_ != NULL) {
6033 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6034 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
6035 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6036 g_propagate_error (error, _inner_error_);
6037 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6038 _g_free0 (ns);
6039 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6040 return;
6041 #line 6042 "tracker-sparql-query.c"
6042 } else {
6043 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6044 _g_free0 (ns);
6045 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6046 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6047 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6048 g_clear_error (&_inner_error_);
6049 #line 596 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6050 return;
6051 #line 6052 "tracker-sparql-query.c"
6052 }
6053 }
6054 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6055 _tmp6_ = ns;
6056 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6057 _tmp7_ = tracker_sparql_query_get_last_string (self, 0);
6058 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6059 _tmp8_ = _tmp7_;
6060 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6061 _tmp9_ = string_substring (_tmp8_, (glong) 1, (glong) (-1));
6062 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6063 _tmp10_ = _tmp9_;
6064 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6065 _tmp11_ = tracker_sparql_query_resolve_prefixed_name (self, _tmp6_, _tmp10_, &_inner_error_);
6066 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6067 _tmp12_ = _tmp11_;
6068 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6069 _g_free0 (_tmp10_);
6070 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6071 _g_free0 (_tmp8_);
6072 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6073 _tmp13_ = _tmp12_;
6074 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6075 if (_inner_error_ != NULL) {
6076 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6077 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
6078 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6079 g_propagate_error (error, _inner_error_);
6080 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6081 _g_free0 (ns);
6082 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6083 return;
6084 #line 6085 "tracker-sparql-query.c"
6085 } else {
6086 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6087 _g_free0 (ns);
6088 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6089 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6090 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6091 g_clear_error (&_inner_error_);
6092 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6093 return;
6094 #line 6095 "tracker-sparql-query.c"
6095 }
6096 }
6097 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6098 _g_free0 (self->priv->current_graph);
6099 #line 597 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6100 self->priv->current_graph = _tmp13_;
6101 #line 594 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6102 _g_free0 (ns);
6103 #line 6104 "tracker-sparql-query.c"
6104 } else {
6105 gchar* _tmp14_ = NULL;
6106 gchar* _tmp15_;
6107 gchar* _tmp16_ = NULL;
6108 gchar* _tmp17_;
6109 gchar* _tmp18_ = NULL;
6110 gchar* _tmp19_;
6111 gchar* _tmp20_;
6112 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6113 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
6114 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6115 if (_inner_error_ != NULL) {
6116 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6117 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
6118 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6119 g_propagate_error (error, _inner_error_);
6120 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6121 return;
6122 #line 6123 "tracker-sparql-query.c"
6123 } else {
6124 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6125 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6126 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6127 g_clear_error (&_inner_error_);
6128 #line 599 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6129 return;
6130 #line 6131 "tracker-sparql-query.c"
6131 }
6132 }
6133 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6134 _tmp14_ = tracker_sparql_query_get_last_string (self, 0);
6135 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6136 _tmp15_ = _tmp14_;
6137 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6138 _tmp16_ = string_substring (_tmp15_, (glong) 1, (glong) (-1));
6139 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6140 _tmp17_ = _tmp16_;
6141 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6142 _tmp18_ = tracker_sparql_query_resolve_prefixed_name (self, "", _tmp17_, &_inner_error_);
6143 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6144 _tmp19_ = _tmp18_;
6145 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6146 _g_free0 (_tmp17_);
6147 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6148 _g_free0 (_tmp15_);
6149 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6150 _tmp20_ = _tmp19_;
6151 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6152 if (_inner_error_ != NULL) {
6153 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6154 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
6155 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6156 g_propagate_error (error, _inner_error_);
6157 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6158 return;
6159 #line 6160 "tracker-sparql-query.c"
6160 } else {
6161 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6162 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
6163 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6164 g_clear_error (&_inner_error_);
6165 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6166 return;
6167 #line 6168 "tracker-sparql-query.c"
6168 }
6169 }
6170 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6171 _g_free0 (self->priv->current_graph);
6172 #line 600 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6173 self->priv->current_graph = _tmp20_;
6174 #line 6175 "tracker-sparql-query.c"
6175 }
6176 }
6177 }
6178
6179
6180 static GVariant* _variant_new1 (GHashTable* value) {
6181 GVariantBuilder _tmp131_;
6182 GHashTableIter _tmp132_;
6183 gpointer _tmp133_;
6184 gpointer _tmp134_;
6185 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6186 g_hash_table_iter_init (&_tmp132_, value);
6187 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6188 g_variant_builder_init (&_tmp131_, G_VARIANT_TYPE ("a{ss}"));
6189 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6190 while (g_hash_table_iter_next (&_tmp132_, &_tmp133_, &_tmp134_)) {
6191 #line 6192 "tracker-sparql-query.c"
6192 gchar* _key;
6193 gchar* _value;
6194 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6195 _key = (gchar*) _tmp133_;
6196 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6197 _value = (gchar*) _tmp134_;
6198 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6199 g_variant_builder_add (&_tmp131_, "{?*}", g_variant_new_string (_key), g_variant_new_string (_value));
6200 #line 6201 "tracker-sparql-query.c"
6201 }
6202 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6203 return g_variant_ref_sink (g_variant_builder_end (&_tmp131_));
6204 #line 6205 "tracker-sparql-query.c"
6205 }
6206
6207
6208 static void tracker_sparql_query_execute_insert_or_delete (TrackerSparqlQuery* self, GVariantBuilder* update_blank_nodes, GError** error) {
6209 gboolean blank;
6210 gboolean _tmp0_ = FALSE;
6211 gboolean _tmp1_;
6212 gboolean delete_statements = FALSE;
6213 gboolean update_statements = FALSE;
6214 gboolean _tmp2_ = FALSE;
6215 gboolean _tmp3_;
6216 gboolean _tmp21_ = FALSE;
6217 const gchar* _tmp22_;
6218 gboolean _tmp25_;
6219 gboolean data;
6220 GString* _tmp26_;
6221 GString* pattern_sql;
6222 GString* _tmp27_;
6223 GString* sql;
6224 TrackerSourceLocation _tmp28_ = {0};
6225 TrackerSourceLocation template_location;
6226 gboolean _tmp29_;
6227 TrackerSourceLocation _tmp50_ = {0};
6228 TrackerSourceLocation after_where;
6229 TrackerSparqlSolution* _tmp51_;
6230 TrackerSparqlSolution* solution;
6231 GString* _tmp52_;
6232 gint var_idx;
6233 TrackerSparqlContext* _tmp53_;
6234 GHashTable* _tmp54_;
6235 GList* _tmp55_ = NULL;
6236 gint _tmp81_;
6237 GString* _tmp83_;
6238 GString* _tmp84_;
6239 GString* _tmp85_;
6240 const gchar* _tmp86_;
6241 GString* _tmp87_;
6242 GString* _tmp88_;
6243 const gchar* _tmp89_;
6244 TrackerDBCursor* _tmp90_ = NULL;
6245 TrackerDBCursor* cursor;
6246 gboolean _tmp91_;
6247 gboolean _tmp92_;
6248 gint n_solutions;
6249 gboolean _tmp136_;
6250 TrackerSparqlContext* _tmp138_;
6251 TrackerSparqlContext* _tmp139_;
6252 TrackerSparqlContext* _tmp140_;
6253 GError * _inner_error_ = NULL;
6254 #line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6255 g_return_if_fail (self != NULL);
6256 #line 605 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6257 blank = TRUE;
6258 #line 609 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6259 _tmp0_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_WITH, &_inner_error_);
6260 #line 609 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6261 _tmp1_ = _tmp0_;
6262 #line 609 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6263 if (_inner_error_ != NULL) {
6264 #line 609 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6265 g_propagate_error (error, _inner_error_);
6266 #line 609 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6267 return;
6268 #line 6269 "tracker-sparql-query.c"
6269 }
6270 #line 609 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6271 if (_tmp1_) {
6272 #line 610 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6273 tracker_sparql_query_parse_from_or_into_param (self, &_inner_error_);
6274 #line 610 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6275 if (_inner_error_ != NULL) {
6276 #line 610 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6277 g_propagate_error (error, _inner_error_);
6278 #line 610 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6279 return;
6280 #line 6281 "tracker-sparql-query.c"
6281 }
6282 } else {
6283 #line 612 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6284 _g_free0 (self->priv->current_graph);
6285 #line 612 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6286 self->priv->current_graph = NULL;
6287 #line 6288 "tracker-sparql-query.c"
6288 }
6289 #line 618 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6290 _tmp2_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_INSERT, &_inner_error_);
6291 #line 618 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6292 _tmp3_ = _tmp2_;
6293 #line 618 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6294 if (_inner_error_ != NULL) {
6295 #line 618 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6296 g_propagate_error (error, _inner_error_);
6297 #line 618 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6298 return;
6299 #line 6300 "tracker-sparql-query.c"
6300 }
6301 #line 618 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6302 if (_tmp3_) {
6303 #line 6304 "tracker-sparql-query.c"
6304 gboolean _tmp4_ = FALSE;
6305 gboolean _tmp5_;
6306 gboolean _tmp6_;
6307 gboolean _tmp9_ = FALSE;
6308 const gchar* _tmp10_;
6309 gboolean _tmp13_;
6310 #line 619 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6311 delete_statements = FALSE;
6312 #line 620 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6313 update_statements = FALSE;
6314 #line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6315 _tmp4_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OR, &_inner_error_);
6316 #line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6317 _tmp5_ = _tmp4_;
6318 #line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6319 if (_inner_error_ != NULL) {
6320 #line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6321 g_propagate_error (error, _inner_error_);
6322 #line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6323 return;
6324 #line 6325 "tracker-sparql-query.c"
6325 }
6326 #line 622 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6327 if (_tmp5_) {
6328 #line 623 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6329 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_REPLACE, &_inner_error_);
6330 #line 623 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6331 if (_inner_error_ != NULL) {
6332 #line 623 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6333 g_propagate_error (error, _inner_error_);
6334 #line 623 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6335 return;
6336 #line 6337 "tracker-sparql-query.c"
6337 }
6338 #line 624 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6339 update_statements = TRUE;
6340 #line 6341 "tracker-sparql-query.c"
6341 }
6342 #line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6343 _tmp6_ = update_statements;
6344 #line 627 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6345 if (!_tmp6_) {
6346 #line 6347 "tracker-sparql-query.c"
6347 gboolean _tmp7_ = FALSE;
6348 gboolean _tmp8_;
6349 #line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6350 _tmp7_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_SILENT, &_inner_error_);
6351 #line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6352 _tmp8_ = _tmp7_;
6353 #line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6354 if (_inner_error_ != NULL) {
6355 #line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6356 g_propagate_error (error, _inner_error_);
6357 #line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6358 return;
6359 #line 6360 "tracker-sparql-query.c"
6360 }
6361 #line 629 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6362 self->priv->silent = _tmp8_;
6363 #line 6364 "tracker-sparql-query.c"
6364 }
6365 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6366 _tmp10_ = self->priv->current_graph;
6367 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6368 if (_tmp10_ == NULL) {
6369 #line 6370 "tracker-sparql-query.c"
6370 gboolean _tmp11_ = FALSE;
6371 gboolean _tmp12_;
6372 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6373 _tmp11_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_INTO, &_inner_error_);
6374 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6375 _tmp12_ = _tmp11_;
6376 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6377 if (_inner_error_ != NULL) {
6378 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6379 g_propagate_error (error, _inner_error_);
6380 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6381 return;
6382 #line 6383 "tracker-sparql-query.c"
6383 }
6384 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6385 _tmp9_ = _tmp12_;
6386 #line 6387 "tracker-sparql-query.c"
6387 } else {
6388 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6389 _tmp9_ = FALSE;
6390 #line 6391 "tracker-sparql-query.c"
6391 }
6392 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6393 _tmp13_ = _tmp9_;
6394 #line 632 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6395 if (_tmp13_) {
6396 #line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6397 tracker_sparql_query_parse_from_or_into_param (self, &_inner_error_);
6398 #line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6399 if (_inner_error_ != NULL) {
6400 #line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6401 g_propagate_error (error, _inner_error_);
6402 #line 633 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6403 return;
6404 #line 6405 "tracker-sparql-query.c"
6405 }
6406 }
6407 } else {
6408 gboolean _tmp14_ = FALSE;
6409 gboolean _tmp15_;
6410 gboolean _tmp16_ = FALSE;
6411 const gchar* _tmp17_;
6412 gboolean _tmp20_;
6413 #line 636 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6414 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_DELETE, &_inner_error_);
6415 #line 636 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6416 if (_inner_error_ != NULL) {
6417 #line 636 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6418 g_propagate_error (error, _inner_error_);
6419 #line 636 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6420 return;
6421 #line 6422 "tracker-sparql-query.c"
6422 }
6423 #line 637 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6424 delete_statements = TRUE;
6425 #line 638 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6426 update_statements = FALSE;
6427 #line 639 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6428 blank = FALSE;
6429 #line 642 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6430 _tmp14_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_SILENT, &_inner_error_);
6431 #line 642 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6432 _tmp15_ = _tmp14_;
6433 #line 642 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6434 if (_inner_error_ != NULL) {
6435 #line 642 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6436 g_propagate_error (error, _inner_error_);
6437 #line 642 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6438 return;
6439 #line 6440 "tracker-sparql-query.c"
6440 }
6441 #line 642 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6442 self->priv->silent = _tmp15_;
6443 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6444 _tmp17_ = self->priv->current_graph;
6445 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6446 if (_tmp17_ == NULL) {
6447 #line 6448 "tracker-sparql-query.c"
6448 gboolean _tmp18_ = FALSE;
6449 gboolean _tmp19_;
6450 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6451 _tmp18_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_FROM, &_inner_error_);
6452 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6453 _tmp19_ = _tmp18_;
6454 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6455 if (_inner_error_ != NULL) {
6456 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6457 g_propagate_error (error, _inner_error_);
6458 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6459 return;
6460 #line 6461 "tracker-sparql-query.c"
6461 }
6462 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6463 _tmp16_ = _tmp19_;
6464 #line 6465 "tracker-sparql-query.c"
6465 } else {
6466 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6467 _tmp16_ = FALSE;
6468 #line 6469 "tracker-sparql-query.c"
6469 }
6470 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6471 _tmp20_ = _tmp16_;
6472 #line 644 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6473 if (_tmp20_) {
6474 #line 645 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6475 tracker_sparql_query_parse_from_or_into_param (self, &_inner_error_);
6476 #line 645 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6477 if (_inner_error_ != NULL) {
6478 #line 645 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6479 g_propagate_error (error, _inner_error_);
6480 #line 645 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6481 return;
6482 #line 6483 "tracker-sparql-query.c"
6483 }
6484 }
6485 }
6486 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6487 _tmp22_ = self->priv->current_graph;
6488 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6489 if (_tmp22_ == NULL) {
6490 #line 6491 "tracker-sparql-query.c"
6491 gboolean _tmp23_ = FALSE;
6492 gboolean _tmp24_;
6493 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6494 _tmp23_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DATA, &_inner_error_);
6495 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6496 _tmp24_ = _tmp23_;
6497 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6498 if (_inner_error_ != NULL) {
6499 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6500 g_propagate_error (error, _inner_error_);
6501 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6502 return;
6503 #line 6504 "tracker-sparql-query.c"
6504 }
6505 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6506 _tmp21_ = _tmp24_;
6507 #line 6508 "tracker-sparql-query.c"
6508 } else {
6509 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6510 _tmp21_ = FALSE;
6511 #line 6512 "tracker-sparql-query.c"
6512 }
6513 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6514 _tmp25_ = _tmp21_;
6515 #line 650 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6516 data = _tmp25_;
6517 #line 652 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6518 _tmp26_ = g_string_new ("");
6519 #line 652 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6520 pattern_sql = _tmp26_;
6521 #line 654 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6522 _tmp27_ = g_string_new ("");
6523 #line 654 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6524 sql = _tmp27_;
6525 #line 656 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6526 tracker_sparql_query_get_location (self, &_tmp28_);
6527 #line 656 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6528 template_location = _tmp28_;
6529 #line 658 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6530 _tmp29_ = data;
6531 #line 658 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6532 if (!_tmp29_) {
6533 #line 6534 "tracker-sparql-query.c"
6534 gboolean _tmp30_ = FALSE;
6535 gboolean delete_where;
6536 gboolean _tmp31_;
6537 gboolean _tmp33_ = FALSE;
6538 gboolean _tmp34_;
6539 gboolean _tmp37_;
6540 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6541 _tmp30_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_WHERE, &_inner_error_);
6542 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6543 delete_where = _tmp30_;
6544 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6545 if (_inner_error_ != NULL) {
6546 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6547 g_propagate_error (error, _inner_error_);
6548 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6549 _g_string_free0 (sql);
6550 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6551 _g_string_free0 (pattern_sql);
6552 #line 660 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6553 return;
6554 #line 6555 "tracker-sparql-query.c"
6555 }
6556 #line 662 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6557 _tmp31_ = delete_where;
6558 #line 662 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6559 if (_tmp31_) {
6560 #line 6561 "tracker-sparql-query.c"
6561 TrackerSourceLocation _tmp32_ = {0};
6562 #line 663 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6563 tracker_sparql_query_get_location (self, &_tmp32_);
6564 #line 663 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6565 template_location = _tmp32_;
6566 #line 6567 "tracker-sparql-query.c"
6567 } else {
6568 #line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6569 tracker_sparql_query_skip_braces (self, &_inner_error_);
6570 #line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6571 if (_inner_error_ != NULL) {
6572 #line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6573 g_propagate_error (error, _inner_error_);
6574 #line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6575 _g_string_free0 (sql);
6576 #line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6577 _g_string_free0 (pattern_sql);
6578 #line 665 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6579 return;
6580 #line 6581 "tracker-sparql-query.c"
6581 }
6582 }
6583 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6584 _tmp34_ = delete_where;
6585 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6586 if (_tmp34_) {
6587 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6588 _tmp33_ = TRUE;
6589 #line 6590 "tracker-sparql-query.c"
6590 } else {
6591 gboolean _tmp35_ = FALSE;
6592 gboolean _tmp36_;
6593 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6594 _tmp35_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_WHERE, &_inner_error_);
6595 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6596 _tmp36_ = _tmp35_;
6597 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6598 if (_inner_error_ != NULL) {
6599 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6600 g_propagate_error (error, _inner_error_);
6601 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6602 _g_string_free0 (sql);
6603 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6604 _g_string_free0 (pattern_sql);
6605 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6606 return;
6607 #line 6608 "tracker-sparql-query.c"
6608 }
6609 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6610 _tmp33_ = _tmp36_;
6611 #line 6612 "tracker-sparql-query.c"
6612 }
6613 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6614 _tmp37_ = _tmp33_;
6615 #line 668 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6616 if (_tmp37_) {
6617 #line 6618 "tracker-sparql-query.c"
6618 TrackerSparqlPattern* _tmp38_;
6619 const gchar* _tmp39_;
6620 gchar* _tmp40_;
6621 TrackerSparqlPattern* _tmp41_;
6622 GString* _tmp42_;
6623 TrackerSparqlContext* _tmp43_ = NULL;
6624 TrackerSparqlContext* _tmp44_;
6625 TrackerSparqlPattern* _tmp45_;
6626 #line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6627 _tmp38_ = self->pattern;
6628 #line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6629 _tmp39_ = self->priv->current_graph;
6630 #line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6631 _tmp40_ = g_strdup (_tmp39_);
6632 #line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6633 _g_free0 (_tmp38_->current_graph);
6634 #line 669 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6635 _tmp38_->current_graph = _tmp40_;
6636 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6637 _tmp41_ = self->pattern;
6638 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6639 _tmp42_ = pattern_sql;
6640 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6641 _tmp43_ = tracker_sparql_pattern_translate_group_graph_pattern (_tmp41_, _tmp42_, &_inner_error_);
6642 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6643 _tmp44_ = _tmp43_;
6644 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6645 if (_inner_error_ != NULL) {
6646 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6647 g_propagate_error (error, _inner_error_);
6648 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6649 _g_string_free0 (sql);
6650 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6651 _g_string_free0 (pattern_sql);
6652 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6653 return;
6654 #line 6655 "tracker-sparql-query.c"
6655 }
6656 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6657 _tracker_sparql_context_unref0 (self->context);
6658 #line 670 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6659 self->context = _tmp44_;
6660 #line 671 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6661 _tmp45_ = self->pattern;
6662 #line 671 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6663 _g_free0 (_tmp45_->current_graph);
6664 #line 671 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6665 _tmp45_->current_graph = NULL;
6666 #line 6667 "tracker-sparql-query.c"
6667 } else {
6668 TrackerSparqlContext* _tmp46_;
6669 GString* _tmp47_;
6670 #line 673 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6671 _tmp46_ = tracker_sparql_context_new (self, NULL);
6672 #line 673 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6673 _tracker_sparql_context_unref0 (self->context);
6674 #line 673 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6675 self->context = _tmp46_;
6676 #line 675 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6677 _tmp47_ = pattern_sql;
6678 #line 675 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6679 g_string_append (_tmp47_, "SELECT 1");
6680 #line 6681 "tracker-sparql-query.c"
6681 }
6682 } else {
6683 TrackerSparqlContext* _tmp48_;
6684 GString* _tmp49_;
6685 #line 680 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6686 _tmp48_ = tracker_sparql_context_new (self, NULL);
6687 #line 680 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6688 _tracker_sparql_context_unref0 (self->context);
6689 #line 680 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6690 self->context = _tmp48_;
6691 #line 682 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6692 _tmp49_ = pattern_sql;
6693 #line 682 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6694 g_string_append (_tmp49_, "SELECT 1");
6695 #line 6696 "tracker-sparql-query.c"
6696 }
6697 #line 685 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6698 tracker_sparql_query_get_location (self, &_tmp50_);
6699 #line 685 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6700 after_where = _tmp50_;
6701 #line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6702 _tmp51_ = tracker_sparql_solution_new ();
6703 #line 687 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6704 solution = _tmp51_;
6705 #line 690 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6706 _tmp52_ = sql;
6707 #line 690 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6708 g_string_append (_tmp52_, "SELECT ");
6709 #line 691 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6710 var_idx = 0;
6711 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6712 _tmp53_ = self->context;
6713 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6714 _tmp54_ = _tmp53_->var_set;
6715 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6716 _tmp55_ = g_hash_table_get_keys (_tmp54_);
6717 #line 6718 "tracker-sparql-query.c"
6718 {
6719 GList* variable_collection = NULL;
6720 GList* variable_it = NULL;
6721 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6722 variable_collection = _tmp55_;
6723 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6724 for (variable_it = variable_collection; variable_it != NULL; variable_it = variable_it->next) {
6725 #line 6726 "tracker-sparql-query.c"
6726 TrackerSparqlVariable* variable = NULL;
6727 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6728 variable = (TrackerSparqlVariable*) variable_it->data;
6729 #line 6730 "tracker-sparql-query.c"
6730 {
6731 gint _tmp56_;
6732 TrackerSparqlVariable* _tmp58_;
6733 TrackerSparqlVariableBinding* _tmp59_;
6734 GString* _tmp67_;
6735 TrackerSparqlVariable* _tmp68_;
6736 const gchar* _tmp69_;
6737 const gchar* _tmp70_;
6738 TrackerSparqlVariable* _tmp71_;
6739 TrackerSparqlVariableBinding* _tmp72_;
6740 TrackerPropertyType _tmp73_;
6741 TrackerSparqlSolution* _tmp74_;
6742 GHashTable* _tmp75_;
6743 TrackerSparqlVariable* _tmp76_;
6744 const gchar* _tmp77_;
6745 const gchar* _tmp78_;
6746 gchar* _tmp79_;
6747 gint _tmp80_;
6748 #line 693 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6749 _tmp56_ = var_idx;
6750 #line 693 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6751 if (_tmp56_ > 0) {
6752 #line 6753 "tracker-sparql-query.c"
6753 GString* _tmp57_;
6754 #line 694 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6755 _tmp57_ = sql;
6756 #line 694 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6757 g_string_append (_tmp57_, ", ");
6758 #line 6759 "tracker-sparql-query.c"
6759 }
6760 #line 697 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6761 _tmp58_ = variable;
6762 #line 697 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6763 _tmp59_ = _tmp58_->binding;
6764 #line 697 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6765 if (_tmp59_ == NULL) {
6766 #line 6767 "tracker-sparql-query.c"
6767 TrackerSparqlVariable* _tmp60_;
6768 const gchar* _tmp61_;
6769 const gchar* _tmp62_;
6770 gchar* _tmp63_ = NULL;
6771 gchar* _tmp64_;
6772 GError* _tmp65_ = NULL;
6773 GError* _tmp66_;
6774 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6775 _tmp60_ = variable;
6776 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6777 _tmp61_ = tracker_sparql_variable_get_name (_tmp60_);
6778 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6779 _tmp62_ = _tmp61_;
6780 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6781 _tmp63_ = g_strdup_printf ("use of undefined variable `%s'", _tmp62_);
6782 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6783 _tmp64_ = _tmp63_;
6784 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6785 _tmp65_ = tracker_sparql_query_get_error (self, _tmp64_);
6786 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6787 _tmp66_ = _tmp65_;
6788 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6789 _g_free0 (_tmp64_);
6790 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6791 _inner_error_ = _tmp66_;
6792 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6793 g_propagate_error (error, _inner_error_);
6794 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6795 _g_list_free0 (variable_collection);
6796 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6797 _tracker_sparql_solution_unref0 (solution);
6798 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6799 _g_string_free0 (sql);
6800 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6801 _g_string_free0 (pattern_sql);
6802 #line 698 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6803 return;
6804 #line 6805 "tracker-sparql-query.c"
6805 }
6806 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6807 _tmp67_ = sql;
6808 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6809 _tmp68_ = variable;
6810 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6811 _tmp69_ = tracker_sparql_variable_get_sql_expression (_tmp68_);
6812 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6813 _tmp70_ = _tmp69_;
6814 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6815 _tmp71_ = variable;
6816 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6817 _tmp72_ = _tmp71_->binding;
6818 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6819 _tmp73_ = ((TrackerSparqlDataBinding*) _tmp72_)->data_type;
6820 #line 700 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6821 tracker_sparql_expression_append_expression_as_string (_tmp67_, _tmp70_, _tmp73_);
6822 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6823 _tmp74_ = solution;
6824 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6825 _tmp75_ = _tmp74_->hash;
6826 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6827 _tmp76_ = variable;
6828 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6829 _tmp77_ = tracker_sparql_variable_get_name (_tmp76_);
6830 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6831 _tmp78_ = _tmp77_;
6832 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6833 _tmp79_ = g_strdup (_tmp78_);
6834 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6835 _tmp80_ = var_idx;
6836 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6837 var_idx = _tmp80_ + 1;
6838 #line 702 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6839 g_hash_table_insert (_tmp75_, _tmp79_, (gpointer) ((gintptr) _tmp80_));
6840 #line 6841 "tracker-sparql-query.c"
6841 }
6842 }
6843 #line 692 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6844 _g_list_free0 (variable_collection);
6845 #line 6846 "tracker-sparql-query.c"
6846 }
6847 #line 705 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6848 _tmp81_ = var_idx;
6849 #line 705 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6850 if (_tmp81_ == 0) {
6851 #line 6852 "tracker-sparql-query.c"
6852 GString* _tmp82_;
6853 #line 706 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6854 _tmp82_ = sql;
6855 #line 706 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6856 g_string_append (_tmp82_, "1");
6857 #line 6858 "tracker-sparql-query.c"
6858 }
6859 #line 710 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6860 _tmp83_ = sql;
6861 #line 710 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6862 g_string_append (_tmp83_, " FROM (");
6863 #line 711 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6864 _tmp84_ = sql;
6865 #line 711 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6866 _tmp85_ = pattern_sql;
6867 #line 711 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6868 _tmp86_ = _tmp85_->str;
6869 #line 711 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6870 g_string_append (_tmp84_, _tmp86_);
6871 #line 712 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6872 _tmp87_ = sql;
6873 #line 712 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6874 g_string_append (_tmp87_, ")");
6875 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6876 _tmp88_ = sql;
6877 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6878 _tmp89_ = _tmp88_->str;
6879 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6880 _tmp90_ = tracker_sparql_query_exec_sql_cursor (self, _tmp89_, NULL, 0, NULL, 0, FALSE, &_inner_error_);
6881 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6882 cursor = _tmp90_;
6883 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6884 if (_inner_error_ != NULL) {
6885 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6886 g_propagate_error (error, _inner_error_);
6887 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6888 _tracker_sparql_solution_unref0 (solution);
6889 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6890 _g_string_free0 (sql);
6891 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6892 _g_string_free0 (pattern_sql);
6893 #line 714 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6894 return;
6895 #line 6896 "tracker-sparql-query.c"
6896 }
6897 #line 716 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6898 _tmp91_ = delete_statements;
6899 #line 716 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6900 self->priv->delete_statements = _tmp91_;
6901 #line 717 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6902 _tmp92_ = update_statements;
6903 #line 717 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6904 self->priv->update_statements = _tmp92_;
6905 #line 719 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6906 n_solutions = 0;
6907 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6908 while (TRUE) {
6909 #line 6910 "tracker-sparql-query.c"
6910 TrackerDBCursor* _tmp93_;
6911 gboolean _tmp94_ = FALSE;
6912 gboolean _tmp95_;
6913 gint _tmp109_;
6914 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6915 _tmp93_ = cursor;
6916 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6917 _tmp94_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _tmp93_, NULL, &_inner_error_);
6918 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6919 _tmp95_ = _tmp94_;
6920 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6921 if (_inner_error_ != NULL) {
6922 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6923 g_propagate_error (error, _inner_error_);
6924 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6925 _g_object_unref0 (cursor);
6926 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6927 _tracker_sparql_solution_unref0 (solution);
6928 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6929 _g_string_free0 (sql);
6930 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6931 _g_string_free0 (pattern_sql);
6932 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6933 return;
6934 #line 6935 "tracker-sparql-query.c"
6935 }
6936 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6937 if (!_tmp95_) {
6938 #line 720 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6939 break;
6940 #line 6941 "tracker-sparql-query.c"
6941 }
6942 {
6943 gboolean _tmp96_;
6944 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6945 var_idx = 0;
6946 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6947 _tmp96_ = TRUE;
6948 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6949 while (TRUE) {
6950 #line 6951 "tracker-sparql-query.c"
6951 gboolean _tmp97_;
6952 gint _tmp99_;
6953 TrackerSparqlSolution* _tmp100_;
6954 GHashTable* _tmp101_;
6955 guint _tmp102_ = 0U;
6956 TrackerSparqlSolution* _tmp103_;
6957 GPtrArray* _tmp104_;
6958 TrackerDBCursor* _tmp105_;
6959 gint _tmp106_;
6960 const gchar* _tmp107_ = NULL;
6961 gchar* _tmp108_;
6962 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6963 _tmp97_ = _tmp96_;
6964 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6965 if (!_tmp97_) {
6966 #line 6967 "tracker-sparql-query.c"
6967 gint _tmp98_;
6968 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6969 _tmp98_ = var_idx;
6970 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6971 var_idx = _tmp98_ + 1;
6972 #line 6973 "tracker-sparql-query.c"
6973 }
6974 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6975 _tmp96_ = FALSE;
6976 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6977 _tmp99_ = var_idx;
6978 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6979 _tmp100_ = solution;
6980 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6981 _tmp101_ = _tmp100_->hash;
6982 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6983 _tmp102_ = g_hash_table_size (_tmp101_);
6984 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6985 if (!(((guint) _tmp99_) < _tmp102_)) {
6986 #line 722 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6987 break;
6988 #line 6989 "tracker-sparql-query.c"
6989 }
6990 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6991 _tmp103_ = solution;
6992 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6993 _tmp104_ = _tmp103_->values;
6994 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6995 _tmp105_ = cursor;
6996 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6997 _tmp106_ = var_idx;
6998 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
6999 _tmp107_ = tracker_sparql_cursor_get_string ((TrackerSparqlCursor*) _tmp105_, _tmp106_, NULL);
7000 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7001 _tmp108_ = g_strdup (_tmp107_);
7002 #line 723 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7003 g_ptr_array_add (_tmp104_, _tmp108_);
7004 #line 7005 "tracker-sparql-query.c"
7005 }
7006 }
7007 #line 725 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7008 _tmp109_ = n_solutions;
7009 #line 725 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7010 n_solutions = _tmp109_ + 1;
7011 #line 7012 "tracker-sparql-query.c"
7012 }
7013 #line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7014 _g_object_unref0 (cursor);
7015 #line 728 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7016 cursor = NULL;
7017 #line 7018 "tracker-sparql-query.c"
7018 {
7019 gint i;
7020 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7021 i = 0;
7022 #line 7023 "tracker-sparql-query.c"
7023 {
7024 gboolean _tmp110_;
7025 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7026 _tmp110_ = TRUE;
7027 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7028 while (TRUE) {
7029 #line 7030 "tracker-sparql-query.c"
7030 gboolean _tmp111_;
7031 gint _tmp113_;
7032 gint _tmp114_;
7033 guchar* _tmp115_;
7034 gint _tmp115__length1;
(emitted by gcc) 7035 GHashFunc _tmp116_;
7036 GEqualFunc _tmp117_;
7037 GDestroyNotify _tmp118_;
7038 GDestroyNotify _tmp119_;
7039 GHashTable* _tmp120_;
7040 TrackerSourceLocation _tmp121_;
7041 TrackerSparqlSolution* _tmp122_;
7042 gint _tmp123_;
7043 TrackerSparqlSolution* _tmp124_;
7044 gboolean _tmp125_ = FALSE;
7045 gboolean _tmp126_;
7046 gboolean _tmp128_;
7047 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7048 _tmp111_ = _tmp110_;
7049 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7050 if (!_tmp111_) {
7051 #line 7052 "tracker-sparql-query.c"
7052 gint _tmp112_;
7053 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7054 _tmp112_ = i;
7055 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7056 i = _tmp112_ + 1;
7057 #line 7058 "tracker-sparql-query.c"
7058 }
7059 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7060 _tmp110_ = FALSE;
7061 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7062 _tmp113_ = i;
7063 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7064 _tmp114_ = n_solutions;
7065 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7066 if (!(_tmp113_ < _tmp114_)) {
7067 #line 731 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7068 break;
7069 #line 7070 "tracker-sparql-query.c"
7070 }
7071 #line 734 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7072 _tmp115_ = self->priv->base_uuid;
7073 #line 734 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7074 _tmp115__length1 = self->priv->base_uuid_length1;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
7075 #line 734 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7076 uuid_generate (_tmp115_);
7077 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7078 _tmp116_ = g_str_hash;
7079 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7080 _tmp117_ = g_str_equal;
7081 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7082 _tmp118_ = g_free;
7083 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7084 _tmp119_ = g_free;
7085 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7086 _tmp120_ = g_hash_table_new_full (_tmp116_, _tmp117_, _tmp118_, _tmp119_);
7087 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7088 _g_hash_table_unref0 (self->priv->blank_nodes);
7089 #line 735 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7090 self->priv->blank_nodes = _tmp120_;
7091 #line 737 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7092 _tmp121_ = template_location;
7093 #line 737 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7094 tracker_sparql_query_set_location (self, &_tmp121_);
7095 #line 739 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7096 _tmp122_ = solution;
7097 #line 739 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7098 _tmp123_ = i;
7099 #line 739 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7100 _tmp122_->solution_index = _tmp123_;
7101 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7102 _tmp124_ = solution;
7103 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7104 tracker_sparql_query_parse_construct_triples_block (self, _tmp124_, &_inner_error_);
7105 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7106 if (_inner_error_ != NULL) {
7107 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7108 g_propagate_error (error, _inner_error_);
7109 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7110 _g_object_unref0 (cursor);
7111 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7112 _tracker_sparql_solution_unref0 (solution);
7113 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7114 _g_string_free0 (sql);
7115 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7116 _g_string_free0 (pattern_sql);
7117 #line 742 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7118 return;
7119 #line 7120 "tracker-sparql-query.c"
7120 }
7121 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7122 _tmp126_ = blank;
7123 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7124 if (_tmp126_) {
7125 #line 7126 "tracker-sparql-query.c"
7126 GVariantBuilder* _tmp127_;
7127 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7128 _tmp127_ = update_blank_nodes;
7129 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7130 _tmp125_ = _tmp127_ != NULL;
7131 #line 7132 "tracker-sparql-query.c"
7132 } else {
7133 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7134 _tmp125_ = FALSE;
7135 #line 7136 "tracker-sparql-query.c"
7136 }
7137 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7138 _tmp128_ = _tmp125_;
7139 #line 744 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7140 if (_tmp128_) {
7141 #line 7142 "tracker-sparql-query.c"
7142 GVariantBuilder* _tmp129_;
7143 GHashTable* _tmp130_;
7144 GVariant* _tmp135_;
7145 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7146 _tmp129_ = update_blank_nodes;
7147 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7148 _tmp130_ = self->priv->blank_nodes;
7149 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7150 _tmp135_ = _variant_new1 (_tmp130_);
7151 #line 745 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7152 g_variant_builder_add_value (_tmp129_, _tmp135_);
7153 #line 7154 "tracker-sparql-query.c"
7154 }
7155 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7156 tracker_data_update_buffer_might_flush (&_inner_error_);
7157 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7158 if (_inner_error_ != NULL) {
7159 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7160 g_propagate_error (error, _inner_error_);
7161 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7162 _g_object_unref0 (cursor);
7163 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7164 _tracker_sparql_solution_unref0 (solution);
7165 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7166 _g_string_free0 (sql);
7167 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7168 _g_string_free0 (pattern_sql);
7169 #line 748 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7170 return;
7171 #line 7172 "tracker-sparql-query.c"
7172 }
7173 }
7174 }
7175 }
7176 #line 751 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7177 _tracker_sparql_solution_unref0 (solution);
7178 #line 751 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7179 solution = NULL;
7180 #line 753 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7181 _tmp136_ = data;
7182 #line 753 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7183 if (!_tmp136_) {
7184 #line 7185 "tracker-sparql-query.c"
7185 TrackerSourceLocation _tmp137_;
7186 #line 755 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7187 _tmp137_ = after_where;
7188 #line 755 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7189 tracker_sparql_query_set_location (self, &_tmp137_);
7190 #line 7191 "tracker-sparql-query.c"
7191 }
7192 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7193 tracker_data_update_buffer_flush (&_inner_error_);
7194 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7195 if (_inner_error_ != NULL) {
7196 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7197 g_propagate_error (error, _inner_error_);
7198 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7199 _g_object_unref0 (cursor);
7200 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7201 _tracker_sparql_solution_unref0 (solution);
7202 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7203 _g_string_free0 (sql);
7204 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7205 _g_string_free0 (pattern_sql);
7206 #line 759 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7207 return;
7208 #line 7209 "tracker-sparql-query.c"
7209 }
7210 #line 760 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7211 __g_list_free__g_object_unref0_0 (self->bindings);
7212 #line 760 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7213 self->bindings = NULL;
7214 #line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7215 _tmp138_ = self->context;
7216 #line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7217 _tmp139_ = _tmp138_->parent_context;
7218 #line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7219 _tmp140_ = _tracker_sparql_context_ref0 (_tmp139_);
7220 #line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7221 _tracker_sparql_context_unref0 (self->context);
7222 #line 762 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7223 self->context = _tmp140_;
7224 #line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7225 _g_object_unref0 (cursor);
7226 #line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7227 _tracker_sparql_solution_unref0 (solution);
7228 #line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7229 _g_string_free0 (sql);
7230 #line 604 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7231 _g_string_free0 (pattern_sql);
7232 #line 7233 "tracker-sparql-query.c"
7233 }
7234
7235
7236 gchar* tracker_sparql_query_resolve_prefixed_name (TrackerSparqlQuery* self, const gchar* prefix, const gchar* local_name, GError** error) {
7237 gchar* result = NULL;
7238 GHashTable* _tmp0_;
7239 const gchar* _tmp1_;
7240 gconstpointer _tmp2_ = NULL;
7241 gchar* _tmp3_;
7242 gchar* ns;
7243 const gchar* _tmp4_;
7244 const gchar* _tmp10_;
7245 const gchar* _tmp11_;
7246 gchar* _tmp12_;
7247 GError * _inner_error_ = NULL;
7248 #line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7249 g_return_val_if_fail (self != NULL, NULL);
7250 #line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7251 g_return_val_if_fail (prefix != NULL, NULL);
7252 #line 765 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7253 g_return_val_if_fail (local_name != NULL, NULL);
7254 #line 766 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7255 _tmp0_ = self->priv->prefix_map;
7256 #line 766 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7257 _tmp1_ = prefix;
7258 #line 766 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7259 _tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
7260 #line 766 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7261 _tmp3_ = g_strdup ((const gchar*) _tmp2_);
7262 #line 766 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7263 ns = _tmp3_;
7264 #line 767 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7265 _tmp4_ = ns;
7266 #line 767 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7267 if (_tmp4_ == NULL) {
7268 #line 7269 "tracker-sparql-query.c"
7269 const gchar* _tmp5_;
7270 gchar* _tmp6_ = NULL;
7271 gchar* _tmp7_;
7272 GError* _tmp8_ = NULL;
7273 GError* _tmp9_;
7274 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7275 _tmp5_ = prefix;
7276 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7277 _tmp6_ = g_strdup_printf ("use of undefined prefix `%s'", _tmp5_);
7278 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7279 _tmp7_ = _tmp6_;
7280 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7281 _tmp8_ = tracker_sparql_query_get_error (self, _tmp7_);
7282 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7283 _tmp9_ = _tmp8_;
7284 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7285 _g_free0 (_tmp7_);
7286 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7287 _inner_error_ = _tmp9_;
7288 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7289 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
7290 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7291 g_propagate_error (error, _inner_error_);
7292 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7293 _g_free0 (ns);
7294 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7295 return NULL;
7296 #line 7297 "tracker-sparql-query.c"
7297 } else {
7298 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7299 _g_free0 (ns);
7300 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7301 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7302 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7303 g_clear_error (&_inner_error_);
7304 #line 768 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7305 return NULL;
7306 #line 7307 "tracker-sparql-query.c"
7307 }
7308 }
7309 #line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7310 _tmp10_ = ns;
7311 #line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7312 _tmp11_ = local_name;
7313 #line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7314 _tmp12_ = g_strconcat (_tmp10_, _tmp11_, NULL);
7315 #line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7316 result = _tmp12_;
7317 #line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7318 _g_free0 (ns);
7319 #line 770 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7320 return result;
7321 #line 7322 "tracker-sparql-query.c"
7322 }
7323
7324
7325 static void tracker_sparql_query_skip_braces (TrackerSparqlQuery* self, GError** error) {
7326 gint n_braces;
7327 GError * _inner_error_ = NULL;
7328 #line 773 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7329 g_return_if_fail (self != NULL);
7330 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7331 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
7332 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7333 if (_inner_error_ != NULL) {
7334 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7335 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
7336 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7337 g_propagate_error (error, _inner_error_);
7338 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7339 return;
7340 #line 7341 "tracker-sparql-query.c"
7341 } else {
7342 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7343 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7344 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7345 g_clear_error (&_inner_error_);
7346 #line 774 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7347 return;
7348 #line 7349 "tracker-sparql-query.c"
7349 }
7350 }
7351 #line 775 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7352 n_braces = 1;
7353 #line 776 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7354 while (TRUE) {
7355 #line 7356 "tracker-sparql-query.c"
7356 gint _tmp0_;
7357 gboolean _tmp1_ = FALSE;
7358 gboolean _tmp2_;
7359 #line 776 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7360 _tmp0_ = n_braces;
7361 #line 776 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7362 if (!(_tmp0_ > 0)) {
7363 #line 776 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7364 break;
7365 #line 7366 "tracker-sparql-query.c"
7366 }
7367 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7368 _tmp1_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
7369 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7370 _tmp2_ = _tmp1_;
7371 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7372 if (_inner_error_ != NULL) {
7373 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7374 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
7375 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7376 g_propagate_error (error, _inner_error_);
7377 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7378 return;
7379 #line 7380 "tracker-sparql-query.c"
7380 } else {
7381 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7382 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7383 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7384 g_clear_error (&_inner_error_);
7385 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7386 return;
7387 #line 7388 "tracker-sparql-query.c"
7388 }
7389 }
7390 #line 777 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7391 if (_tmp2_) {
7392 #line 7393 "tracker-sparql-query.c"
7393 gint _tmp3_;
7394 #line 778 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7395 _tmp3_ = n_braces;
7396 #line 778 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7397 n_braces = _tmp3_ + 1;
7398 #line 7399 "tracker-sparql-query.c"
7399 } else {
7400 gboolean _tmp4_ = FALSE;
7401 gboolean _tmp5_;
7402 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7403 _tmp4_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
7404 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7405 _tmp5_ = _tmp4_;
7406 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7407 if (_inner_error_ != NULL) {
7408 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7409 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
7410 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7411 g_propagate_error (error, _inner_error_);
7412 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7413 return;
7414 #line 7415 "tracker-sparql-query.c"
7415 } else {
7416 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7417 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7418 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7419 g_clear_error (&_inner_error_);
7420 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7421 return;
7422 #line 7423 "tracker-sparql-query.c"
7423 }
7424 }
7425 #line 779 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7426 if (_tmp5_) {
7427 #line 7428 "tracker-sparql-query.c"
7428 gint _tmp6_;
7429 #line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7430 _tmp6_ = n_braces;
7431 #line 780 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7432 n_braces = _tmp6_ - 1;
7433 #line 7434 "tracker-sparql-query.c"
7434 } else {
7435 TrackerSparqlTokenType _tmp7_ = 0;
7436 #line 781 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7437 _tmp7_ = tracker_sparql_query_current (self);
7438 #line 781 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7439 if (_tmp7_ == TRACKER_SPARQL_TOKEN_TYPE_EOF) {
7440 #line 7441 "tracker-sparql-query.c"
7441 GError* _tmp8_ = NULL;
7442 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7443 _tmp8_ = tracker_sparql_query_get_error (self, "unexpected end of query, expected }");
7444 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7445 _inner_error_ = _tmp8_;
7446 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7447 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
7448 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7449 g_propagate_error (error, _inner_error_);
7450 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7451 return;
7452 #line 7453 "tracker-sparql-query.c"
7453 } else {
7454 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7455 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7456 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7457 g_clear_error (&_inner_error_);
7458 #line 782 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7459 return;
7460 #line 7461 "tracker-sparql-query.c"
7461 }
7462 } else {
7463 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7464 tracker_sparql_query_next (self, &_inner_error_);
7465 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7466 if (_inner_error_ != NULL) {
7467 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7468 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
7469 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7470 g_propagate_error (error, _inner_error_);
7471 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7472 return;
7473 #line 7474 "tracker-sparql-query.c"
7474 } else {
7475 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7476 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7477 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7478 g_clear_error (&_inner_error_);
7479 #line 785 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7480 return;
7481 #line 7482 "tracker-sparql-query.c"
7482 }
7483 }
7484 }
7485 }
7486 }
7487 }
7488 }
7489
7490
7491 static void tracker_sparql_query_parse_construct_triples_block (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error) {
7492 GError * _inner_error_ = NULL;
7493 #line 790 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7494 g_return_if_fail (self != NULL);
7495 #line 790 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7496 g_return_if_fail (var_value_map != NULL);
7497 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7498 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
7499 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7500 if (_inner_error_ != NULL) {
7501 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7502 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7503 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7504 g_propagate_error (error, _inner_error_);
7505 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7506 return;
7507 #line 7508 "tracker-sparql-query.c"
7508 } else {
7509 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7510 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7511 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7512 g_clear_error (&_inner_error_);
7513 #line 791 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7514 return;
7515 #line 7516 "tracker-sparql-query.c"
7516 }
7517 }
7518 #line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7519 while (TRUE) {
7520 #line 7521 "tracker-sparql-query.c"
7521 TrackerSparqlTokenType _tmp0_ = 0;
7522 gboolean is_null;
7523 gboolean _tmp1_ = FALSE;
7524 gboolean _tmp2_;
7525 #line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7526 _tmp0_ = tracker_sparql_query_current (self);
7527 #line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7528 if (!(_tmp0_ != TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE)) {
7529 #line 793 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7530 break;
7531 #line 7532 "tracker-sparql-query.c"
7532 }
7533 #line 794 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7534 is_null = FALSE;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
7535 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7536 _tmp1_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_GRAPH, &_inner_error_);
7537 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7538 _tmp2_ = _tmp1_;
7539 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7540 if (_inner_error_ != NULL) {
7541 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7542 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7543 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7544 g_propagate_error (error, _inner_error_);
7545 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7546 return;
7547 #line 7548 "tracker-sparql-query.c"
7548 } else {
7549 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7550 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7551 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7552 g_clear_error (&_inner_error_);
7553 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7554 return;
7555 #line 7556 "tracker-sparql-query.c"
7556 }
7557 }
7558 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7559 if (_tmp2_) {
7560 #line 7561 "tracker-sparql-query.c"
7561 const gchar* _tmp3_;
7562 gchar* _tmp4_;
7563 gchar* old_graph;
7564 TrackerSparqlSolution* _tmp5_;
7565 gboolean _tmp6_ = FALSE;
7566 gchar* _tmp7_ = NULL;
7567 gchar* _tmp8_;
7568 gboolean _tmp9_;
7569 const gchar* _tmp21_;
7570 gchar* _tmp22_;
7571 #line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7572 _tmp3_ = self->priv->current_graph;
7573 #line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7574 _tmp4_ = g_strdup (_tmp3_);
7575 #line 797 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7576 old_graph = _tmp4_;
7577 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7578 _tmp5_ = var_value_map;
7579 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7580 _tmp7_ = tracker_sparql_query_parse_construct_var_or_term (self, _tmp5_, &_tmp6_, &_inner_error_);
7581 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7582 is_null = _tmp6_;
7583 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7584 _tmp8_ = _tmp7_;
7585 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7586 if (_inner_error_ != NULL) {
7587 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7588 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7589 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7590 g_propagate_error (error, _inner_error_);
7591 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7592 _g_free0 (old_graph);
7593 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7594 return;
7595 #line 7596 "tracker-sparql-query.c"
7596 } else {
7597 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7598 _g_free0 (old_graph);
7599 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7600 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7601 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7602 g_clear_error (&_inner_error_);
7603 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7604 return;
7605 #line 7606 "tracker-sparql-query.c"
7606 }
7607 }
7608 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7609 _g_free0 (self->priv->current_graph);
7610 #line 798 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7611 self->priv->current_graph = _tmp8_;
7612 #line 800 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7613 _tmp9_ = is_null;
7614 #line 800 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7615 if (_tmp9_) {
7616 #line 7617 "tracker-sparql-query.c"
7617 GError* _tmp10_ = NULL;
7618 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7619 _tmp10_ = tracker_sparql_query_get_error (self, "'null' not supported for graph");
7620 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7621 _inner_error_ = _tmp10_;
7622 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7623 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7624 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7625 g_propagate_error (error, _inner_error_);
7626 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7627 _g_free0 (old_graph);
7628 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7629 return;
7630 #line 7631 "tracker-sparql-query.c"
7631 } else {
7632 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7633 _g_free0 (old_graph);
7634 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7635 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7636 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7637 g_clear_error (&_inner_error_);
7638 #line 801 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7639 return;
7640 #line 7641 "tracker-sparql-query.c"
7641 }
7642 }
7643 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7644 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACE, &_inner_error_);
7645 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7646 if (_inner_error_ != NULL) {
7647 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7648 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7649 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7650 g_propagate_error (error, _inner_error_);
7651 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7652 _g_free0 (old_graph);
7653 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7654 return;
7655 #line 7656 "tracker-sparql-query.c"
7656 } else {
7657 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7658 _g_free0 (old_graph);
7659 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7660 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7661 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7662 g_clear_error (&_inner_error_);
7663 #line 804 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7664 return;
7665 #line 7666 "tracker-sparql-query.c"
7666 }
7667 }
7668 #line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7669 while (TRUE) {
7670 #line 7671 "tracker-sparql-query.c"
7671 TrackerSparqlTokenType _tmp11_ = 0;
7672 TrackerSparqlSolution* _tmp12_;
7673 gboolean _tmp13_ = FALSE;
7674 gchar* _tmp14_ = NULL;
7675 gchar* _tmp15_;
7676 gboolean _tmp16_;
7677 TrackerSparqlSolution* _tmp18_;
7678 gboolean _tmp19_ = FALSE;
7679 gboolean _tmp20_;
7680 #line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7681 _tmp11_ = tracker_sparql_query_current (self);
7682 #line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7683 if (!(_tmp11_ != TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE)) {
7684 #line 806 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7685 break;
7686 #line 7687 "tracker-sparql-query.c"
7687 }
7688 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7689 _tmp12_ = var_value_map;
7690 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7691 _tmp14_ = tracker_sparql_query_parse_construct_var_or_term (self, _tmp12_, &_tmp13_, &_inner_error_);
7692 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7693 is_null = _tmp13_;
7694 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7695 _tmp15_ = _tmp14_;
7696 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7697 if (_inner_error_ != NULL) {
7698 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7699 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7700 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7701 g_propagate_error (error, _inner_error_);
7702 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7703 _g_free0 (old_graph);
7704 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7705 return;
7706 #line 7707 "tracker-sparql-query.c"
7707 } else {
7708 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7709 _g_free0 (old_graph);
7710 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7711 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7712 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7713 g_clear_error (&_inner_error_);
7714 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7715 return;
7716 #line 7717 "tracker-sparql-query.c"
7717 }
7718 }
7719 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7720 _g_free0 (self->priv->current_subject);
7721 #line 807 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7722 self->priv->current_subject = _tmp15_;
7723 #line 809 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7724 _tmp16_ = is_null;
7725 #line 809 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7726 if (_tmp16_) {
7727 #line 7728 "tracker-sparql-query.c"
7728 GError* _tmp17_ = NULL;
7729 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7730 _tmp17_ = tracker_sparql_query_get_error (self, "'null' not supported for subject");
7731 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7732 _inner_error_ = _tmp17_;
7733 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7734 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7735 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7736 g_propagate_error (error, _inner_error_);
7737 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7738 _g_free0 (old_graph);
7739 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7740 return;
7741 #line 7742 "tracker-sparql-query.c"
7742 } else {
7743 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7744 _g_free0 (old_graph);
7745 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7746 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7747 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7748 g_clear_error (&_inner_error_);
7749 #line 810 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7750 return;
7751 #line 7752 "tracker-sparql-query.c"
7752 }
7753 }
7754 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7755 _tmp18_ = var_value_map;
7756 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7757 tracker_sparql_query_parse_construct_property_list_not_empty (self, _tmp18_, &_inner_error_);
7758 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7759 if (_inner_error_ != NULL) {
7760 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7761 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7762 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7763 g_propagate_error (error, _inner_error_);
7764 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7765 _g_free0 (old_graph);
7766 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7767 return;
7768 #line 7769 "tracker-sparql-query.c"
7769 } else {
7770 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7771 _g_free0 (old_graph);
7772 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7773 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7774 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7775 g_clear_error (&_inner_error_);
7776 #line 813 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7777 return;
7778 #line 7779 "tracker-sparql-query.c"
7779 }
7780 }
7781 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7782 _tmp19_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
7783 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7784 _tmp20_ = _tmp19_;
7785 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7786 if (_inner_error_ != NULL) {
7787 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7788 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7789 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7790 g_propagate_error (error, _inner_error_);
7791 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7792 _g_free0 (old_graph);
7793 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7794 return;
7795 #line 7796 "tracker-sparql-query.c"
7796 } else {
7797 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7798 _g_free0 (old_graph);
7799 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7800 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7801 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7802 g_clear_error (&_inner_error_);
7803 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7804 return;
7805 #line 7806 "tracker-sparql-query.c"
7806 }
7807 }
7808 #line 814 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7809 if (!_tmp20_) {
7810 #line 816 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7811 break;
7812 #line 7813 "tracker-sparql-query.c"
7813 }
7814 }
7815 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7816 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
7817 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7818 if (_inner_error_ != NULL) {
7819 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7820 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7821 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7822 g_propagate_error (error, _inner_error_);
7823 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7824 _g_free0 (old_graph);
7825 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7826 return;
7827 #line 7828 "tracker-sparql-query.c"
7828 } else {
7829 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7830 _g_free0 (old_graph);
7831 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7832 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7833 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7834 g_clear_error (&_inner_error_);
7835 #line 820 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7836 return;
7837 #line 7838 "tracker-sparql-query.c"
7838 }
7839 }
7840 #line 822 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7841 _tmp21_ = old_graph;
7842 #line 822 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7843 _tmp22_ = g_strdup (_tmp21_);
7844 #line 822 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7845 _g_free0 (self->priv->current_graph);
7846 #line 822 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7847 self->priv->current_graph = _tmp22_;
7848 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7849 tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
7850 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7851 if (_inner_error_ != NULL) {
7852 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7853 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7854 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7855 g_propagate_error (error, _inner_error_);
7856 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7857 _g_free0 (old_graph);
7858 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7859 return;
7860 #line 7861 "tracker-sparql-query.c"
7861 } else {
7862 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7863 _g_free0 (old_graph);
7864 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7865 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7866 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7867 g_clear_error (&_inner_error_);
7868 #line 824 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7869 return;
7870 #line 7871 "tracker-sparql-query.c"
7871 }
7872 }
7873 #line 796 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7874 _g_free0 (old_graph);
7875 #line 7876 "tracker-sparql-query.c"
7876 } else {
7877 TrackerSparqlSolution* _tmp23_;
7878 gboolean _tmp24_ = FALSE;
7879 gchar* _tmp25_ = NULL;
7880 gchar* _tmp26_;
7881 gboolean _tmp27_;
7882 TrackerSparqlSolution* _tmp29_;
7883 gboolean _tmp30_ = FALSE;
7884 gboolean _tmp31_ = FALSE;
7885 gboolean _tmp32_;
7886 gboolean _tmp34_;
7887 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7888 _tmp23_ = var_value_map;
7889 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7890 _tmp25_ = tracker_sparql_query_parse_construct_var_or_term (self, _tmp23_, &_tmp24_, &_inner_error_);
7891 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7892 is_null = _tmp24_;
7893 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7894 _tmp26_ = _tmp25_;
7895 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7896 if (_inner_error_ != NULL) {
7897 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7898 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7899 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7900 g_propagate_error (error, _inner_error_);
7901 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7902 return;
7903 #line 7904 "tracker-sparql-query.c"
7904 } else {
7905 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7906 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7907 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7908 g_clear_error (&_inner_error_);
7909 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7910 return;
7911 #line 7912 "tracker-sparql-query.c"
7912 }
7913 }
7914 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7915 _g_free0 (self->priv->current_subject);
7916 #line 826 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7917 self->priv->current_subject = _tmp26_;
7918 #line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7919 _tmp27_ = is_null;
7920 #line 828 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7921 if (_tmp27_) {
7922 #line 7923 "tracker-sparql-query.c"
7923 GError* _tmp28_ = NULL;
7924 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7925 _tmp28_ = tracker_sparql_query_get_error (self, "'null' not supported for subject");
7926 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7927 _inner_error_ = _tmp28_;
7928 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7929 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7930 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7931 g_propagate_error (error, _inner_error_);
7932 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7933 return;
7934 #line 7935 "tracker-sparql-query.c"
7935 } else {
7936 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7937 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7938 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7939 g_clear_error (&_inner_error_);
7940 #line 829 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7941 return;
7942 #line 7943 "tracker-sparql-query.c"
7943 }
7944 }
7945 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7946 _tmp29_ = var_value_map;
7947 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7948 tracker_sparql_query_parse_construct_property_list_not_empty (self, _tmp29_, &_inner_error_);
7949 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7950 if (_inner_error_ != NULL) {
7951 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7952 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7953 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7954 g_propagate_error (error, _inner_error_);
7955 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7956 return;
7957 #line 7958 "tracker-sparql-query.c"
7958 } else {
7959 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7960 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7961 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7962 g_clear_error (&_inner_error_);
7963 #line 832 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7964 return;
7965 #line 7966 "tracker-sparql-query.c"
7966 }
7967 }
7968 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7969 _tmp31_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_DOT, &_inner_error_);
7970 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7971 _tmp32_ = _tmp31_;
7972 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7973 if (_inner_error_ != NULL) {
7974 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7975 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
7976 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7977 g_propagate_error (error, _inner_error_);
7978 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7979 return;
7980 #line 7981 "tracker-sparql-query.c"
7981 } else {
7982 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7983 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
7984 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7985 g_clear_error (&_inner_error_);
7986 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7987 return;
7988 #line 7989 "tracker-sparql-query.c"
7989 }
7990 }
7991 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7992 if (!_tmp32_) {
7993 #line 7994 "tracker-sparql-query.c"
7994 TrackerSparqlTokenType _tmp33_ = 0;
7995 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7996 _tmp33_ = tracker_sparql_query_current (self);
7997 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
7998 _tmp30_ = _tmp33_ != TRACKER_SPARQL_TOKEN_TYPE_GRAPH;
7999 #line 8000 "tracker-sparql-query.c"
8000 } else {
8001 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8002 _tmp30_ = FALSE;
8003 #line 8004 "tracker-sparql-query.c"
8004 }
8005 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8006 _tmp34_ = _tmp30_;
8007 #line 833 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8008 if (_tmp34_) {
8009 #line 835 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8010 break;
8011 #line 8012 "tracker-sparql-query.c"
8012 }
8013 }
8014 }
8015 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8016 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACE, &_inner_error_);
8017 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8018 if (_inner_error_ != NULL) {
8019 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8020 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8021 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8022 g_propagate_error (error, _inner_error_);
8023 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8024 return;
8025 #line 8026 "tracker-sparql-query.c"
8026 } else {
8027 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8028 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8029 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8030 g_clear_error (&_inner_error_);
8031 #line 840 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8032 return;
8033 #line 8034 "tracker-sparql-query.c"
8034 }
8035 }
8036 }
8037
8038
8039 static gchar* tracker_sparql_query_parse_construct_var_or_term (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, gboolean* is_null, GError** error) {
8040 gboolean _vala_is_null = FALSE;
8041 gchar* result = NULL;
8042 gchar* _tmp0_;
8043 gchar* _result_;
8044 TrackerSparqlTokenType _tmp1_ = 0;
8045 GError * _inner_error_ = NULL;
8046 #line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8047 g_return_val_if_fail (self != NULL, NULL);
8048 #line 845 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8049 g_return_val_if_fail (var_value_map != NULL, NULL);
8050 #line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8051 _tmp0_ = g_strdup ("");
8052 #line 846 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8053 _result_ = _tmp0_;
8054 #line 847 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8055 _vala_is_null = FALSE;
8056 #line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8057 _tmp1_ = tracker_sparql_query_current (self);
8058 #line 848 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8059 if (_tmp1_ == TRACKER_SPARQL_TOKEN_TYPE_VAR) {
8060 #line 8061 "tracker-sparql-query.c"
8061 TrackerSparqlSolution* _tmp2_;
8062 gchar* _tmp3_ = NULL;
8063 gchar* _tmp4_;
8064 gchar* _tmp5_ = NULL;
8065 gchar* _tmp6_;
8066 gchar* _tmp7_ = NULL;
8067 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8068 tracker_sparql_query_next (self, &_inner_error_);
8069 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8070 if (_inner_error_ != NULL) {
8071 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8072 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8073 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8074 g_propagate_error (error, _inner_error_);
8075 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8076 _g_free0 (_result_);
8077 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8078 return NULL;
8079 #line 8080 "tracker-sparql-query.c"
8080 } else {
8081 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8082 _g_free0 (_result_);
8083 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8084 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8085 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8086 g_clear_error (&_inner_error_);
8087 #line 849 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8088 return NULL;
8089 #line 8090 "tracker-sparql-query.c"
8090 }
8091 }
8092 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8093 _tmp2_ = var_value_map;
8094 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8095 _tmp3_ = tracker_sparql_query_get_last_string (self, 0);
8096 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8097 _tmp4_ = _tmp3_;
8098 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8099 _tmp5_ = string_substring (_tmp4_, (glong) 1, (glong) (-1));
8100 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8101 _tmp6_ = _tmp5_;
8102 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8103 _tmp7_ = tracker_sparql_solution_lookup (_tmp2_, _tmp6_);
8104 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8105 _g_free0 (_result_);
8106 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8107 _result_ = _tmp7_;
8108 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8109 _g_free0 (_tmp6_);
8110 #line 850 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8111 _g_free0 (_tmp4_);
8112 #line 8113 "tracker-sparql-query.c"
8113 } else {
8114 TrackerSparqlTokenType _tmp8_ = 0;
8115 #line 851 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8116 _tmp8_ = tracker_sparql_query_current (self);
8117 #line 851 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8118 if (_tmp8_ == TRACKER_SPARQL_TOKEN_TYPE_IRI_REF) {
8119 #line 8120 "tracker-sparql-query.c"
8120 gchar* _tmp9_ = NULL;
8121 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8122 tracker_sparql_query_next (self, &_inner_error_);
8123 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8124 if (_inner_error_ != NULL) {
8125 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8126 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8127 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8128 g_propagate_error (error, _inner_error_);
8129 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8130 _g_free0 (_result_);
8131 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8132 return NULL;
8133 #line 8134 "tracker-sparql-query.c"
8134 } else {
8135 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8136 _g_free0 (_result_);
8137 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8138 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8139 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8140 g_clear_error (&_inner_error_);
8141 #line 852 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8142 return NULL;
8143 #line 8144 "tracker-sparql-query.c"
8144 }
8145 }
8146 #line 853 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8147 _tmp9_ = tracker_sparql_query_get_last_string (self, 1);
8148 #line 853 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8149 _g_free0 (_result_);
8150 #line 853 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8151 _result_ = _tmp9_;
8152 #line 8153 "tracker-sparql-query.c"
8153 } else {
8154 TrackerSparqlTokenType _tmp10_ = 0;
8155 #line 854 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8156 _tmp10_ = tracker_sparql_query_current (self);
8157 #line 854 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8158 if (_tmp10_ == TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX) {
8159 #line 8160 "tracker-sparql-query.c"
8160 gchar* _tmp11_ = NULL;
8161 gchar* ns;
8162 const gchar* _tmp12_;
8163 gchar* _tmp13_ = NULL;
8164 gchar* _tmp14_;
8165 gchar* _tmp15_ = NULL;
8166 gchar* _tmp16_;
8167 gchar* _tmp17_ = NULL;
8168 gchar* _tmp18_;
8169 gchar* _tmp19_;
8170 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8171 tracker_sparql_query_next (self, &_inner_error_);
8172 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8173 if (_inner_error_ != NULL) {
8174 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8175 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8176 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8177 g_propagate_error (error, _inner_error_);
8178 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8179 _g_free0 (_result_);
8180 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8181 return NULL;
8182 #line 8183 "tracker-sparql-query.c"
8183 } else {
8184 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8185 _g_free0 (_result_);
8186 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8187 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8188 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8189 g_clear_error (&_inner_error_);
8190 #line 856 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8191 return NULL;
8192 #line 8193 "tracker-sparql-query.c"
8193 }
8194 }
8195 #line 857 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8196 _tmp11_ = tracker_sparql_query_get_last_string (self, 0);
8197 #line 857 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8198 ns = _tmp11_;
8199 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8200 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
8201 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8202 if (_inner_error_ != NULL) {
8203 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8204 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8205 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8206 g_propagate_error (error, _inner_error_);
8207 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8208 _g_free0 (ns);
8209 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8210 _g_free0 (_result_);
8211 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8212 return NULL;
8213 #line 8214 "tracker-sparql-query.c"
8214 } else {
8215 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8216 _g_free0 (ns);
8217 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8218 _g_free0 (_result_);
8219 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8220 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8221 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8222 g_clear_error (&_inner_error_);
8223 #line 858 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8224 return NULL;
8225 #line 8226 "tracker-sparql-query.c"
8226 }
8227 }
8228 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8229 _tmp12_ = ns;
8230 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8231 _tmp13_ = tracker_sparql_query_get_last_string (self, 0);
8232 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8233 _tmp14_ = _tmp13_;
8234 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8235 _tmp15_ = string_substring (_tmp14_, (glong) 1, (glong) (-1));
8236 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8237 _tmp16_ = _tmp15_;
8238 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8239 _tmp17_ = tracker_sparql_query_resolve_prefixed_name (self, _tmp12_, _tmp16_, &_inner_error_);
8240 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8241 _tmp18_ = _tmp17_;
8242 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8243 _g_free0 (_tmp16_);
8244 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8245 _g_free0 (_tmp14_);
8246 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8247 _tmp19_ = _tmp18_;
8248 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8249 if (_inner_error_ != NULL) {
8250 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8251 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8252 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8253 g_propagate_error (error, _inner_error_);
8254 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8255 _g_free0 (ns);
8256 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8257 _g_free0 (_result_);
8258 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8259 return NULL;
8260 #line 8261 "tracker-sparql-query.c"
8261 } else {
8262 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8263 _g_free0 (ns);
8264 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8265 _g_free0 (_result_);
8266 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8267 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8268 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8269 g_clear_error (&_inner_error_);
8270 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8271 return NULL;
8272 #line 8273 "tracker-sparql-query.c"
8273 }
8274 }
8275 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8276 _g_free0 (_result_);
8277 #line 859 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8278 _result_ = _tmp19_;
8279 #line 854 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8280 _g_free0 (ns);
8281 #line 8282 "tracker-sparql-query.c"
8282 } else {
8283 TrackerSparqlTokenType _tmp20_ = 0;
8284 #line 860 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8285 _tmp20_ = tracker_sparql_query_current (self);
8286 #line 860 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8287 if (_tmp20_ == TRACKER_SPARQL_TOKEN_TYPE_COLON) {
8288 #line 8289 "tracker-sparql-query.c"
8289 gchar* _tmp21_ = NULL;
8290 gchar* _tmp22_;
8291 gchar* _tmp23_ = NULL;
8292 gchar* _tmp24_;
8293 gchar* _tmp25_ = NULL;
8294 gchar* _tmp26_;
8295 gchar* _tmp27_;
8296 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8297 tracker_sparql_query_next (self, &_inner_error_);
8298 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8299 if (_inner_error_ != NULL) {
8300 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8301 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8302 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8303 g_propagate_error (error, _inner_error_);
8304 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8305 _g_free0 (_result_);
8306 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8307 return NULL;
8308 #line 8309 "tracker-sparql-query.c"
8309 } else {
8310 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8311 _g_free0 (_result_);
8312 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8313 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8314 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8315 g_clear_error (&_inner_error_);
8316 #line 862 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8317 return NULL;
8318 #line 8319 "tracker-sparql-query.c"
8319 }
8320 }
8321 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8322 _tmp21_ = tracker_sparql_query_get_last_string (self, 0);
8323 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8324 _tmp22_ = _tmp21_;
8325 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8326 _tmp23_ = string_substring (_tmp22_, (glong) 1, (glong) (-1));
8327 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8328 _tmp24_ = _tmp23_;
8329 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8330 _tmp25_ = tracker_sparql_query_resolve_prefixed_name (self, "", _tmp24_, &_inner_error_);
8331 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8332 _tmp26_ = _tmp25_;
8333 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8334 _g_free0 (_tmp24_);
8335 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8336 _g_free0 (_tmp22_);
8337 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8338 _tmp27_ = _tmp26_;
8339 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8340 if (_inner_error_ != NULL) {
8341 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8342 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8343 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8344 g_propagate_error (error, _inner_error_);
8345 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8346 _g_free0 (_result_);
8347 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8348 return NULL;
8349 #line 8350 "tracker-sparql-query.c"
8350 } else {
8351 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8352 _g_free0 (_result_);
8353 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8354 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8355 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8356 g_clear_error (&_inner_error_);
8357 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8358 return NULL;
8359 #line 8360 "tracker-sparql-query.c"
8360 }
8361 }
8362 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8363 _g_free0 (_result_);
8364 #line 863 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8365 _result_ = _tmp27_;
8366 #line 8367 "tracker-sparql-query.c"
8367 } else {
8368 gboolean _tmp28_ = FALSE;
8369 gboolean _tmp29_;
8370 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8371 _tmp28_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_BLANK_NODE, &_inner_error_);
8372 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8373 _tmp29_ = _tmp28_;
8374 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8375 if (_inner_error_ != NULL) {
8376 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8377 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8378 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8379 g_propagate_error (error, _inner_error_);
8380 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8381 _g_free0 (_result_);
8382 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8383 return NULL;
8384 #line 8385 "tracker-sparql-query.c"
8385 } else {
8386 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8387 _g_free0 (_result_);
8388 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8389 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8390 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8391 g_clear_error (&_inner_error_);
8392 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8393 return NULL;
8394 #line 8395 "tracker-sparql-query.c"
8395 }
8396 }
8397 #line 864 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8398 if (_tmp29_) {
8399 #line 8400 "tracker-sparql-query.c"
8400 gchar* _tmp30_ = NULL;
8401 gchar* _tmp31_;
8402 gchar* _tmp32_ = NULL;
8403 gchar* _tmp33_;
8404 gchar* _tmp34_ = NULL;
8405 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8406 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
8407 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8408 if (_inner_error_ != NULL) {
8409 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8410 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8411 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8412 g_propagate_error (error, _inner_error_);
8413 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8414 _g_free0 (_result_);
8415 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8416 return NULL;
8417 #line 8418 "tracker-sparql-query.c"
8418 } else {
8419 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8420 _g_free0 (_result_);
8421 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8422 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8423 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8424 g_clear_error (&_inner_error_);
8425 #line 866 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8426 return NULL;
8427 #line 8428 "tracker-sparql-query.c"
8428 }
8429 }
8430 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8431 _tmp30_ = tracker_sparql_query_get_last_string (self, 0);
8432 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8433 _tmp31_ = _tmp30_;
8434 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8435 _tmp32_ = string_substring (_tmp31_, (glong) 1, (glong) (-1));
8436 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8437 _tmp33_ = _tmp32_;
8438 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8439 _tmp34_ = tracker_sparql_query_generate_bnodeid (self, _tmp33_);
8440 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8441 _g_free0 (_result_);
8442 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8443 _result_ = _tmp34_;
8444 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8445 _g_free0 (_tmp33_);
8446 #line 867 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8447 _g_free0 (_tmp31_);
8448 #line 8449 "tracker-sparql-query.c"
8449 } else {
8450 TrackerSparqlTokenType _tmp35_ = 0;
8451 #line 868 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8452 _tmp35_ = tracker_sparql_query_current (self);
8453 #line 868 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8454 if (_tmp35_ == TRACKER_SPARQL_TOKEN_TYPE_MINUS) {
8455 #line 8456 "tracker-sparql-query.c"
8456 gboolean _tmp36_ = FALSE;
8457 gboolean _tmp37_ = FALSE;
8458 TrackerSparqlTokenType _tmp38_ = 0;
8459 gboolean _tmp40_;
8460 gboolean _tmp42_;
8461 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8462 tracker_sparql_query_next (self, &_inner_error_);
8463 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8464 if (_inner_error_ != NULL) {
8465 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8466 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8467 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8468 g_propagate_error (error, _inner_error_);
8469 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8470 _g_free0 (_result_);
8471 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8472 return NULL;
8473 #line 8474 "tracker-sparql-query.c"
8474 } else {
8475 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8476 _g_free0 (_result_);
8477 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8478 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8479 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8480 g_clear_error (&_inner_error_);
8481 #line 869 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8482 return NULL;
8483 #line 8484 "tracker-sparql-query.c"
8484 }
8485 }
8486 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8487 _tmp38_ = tracker_sparql_query_current (self);
8488 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8489 if (_tmp38_ == TRACKER_SPARQL_TOKEN_TYPE_INTEGER) {
8490 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8491 _tmp37_ = TRUE;
8492 #line 8493 "tracker-sparql-query.c"
8493 } else {
8494 TrackerSparqlTokenType _tmp39_ = 0;
8495 #line 871 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8496 _tmp39_ = tracker_sparql_query_current (self);
8497 #line 871 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8498 _tmp37_ = _tmp39_ == TRACKER_SPARQL_TOKEN_TYPE_DECIMAL;
8499 #line 8500 "tracker-sparql-query.c"
8500 }
8501 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8502 _tmp40_ = _tmp37_;
8503 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8504 if (_tmp40_) {
8505 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8506 _tmp36_ = TRUE;
8507 #line 8508 "tracker-sparql-query.c"
8508 } else {
8509 TrackerSparqlTokenType _tmp41_ = 0;
8510 #line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8511 _tmp41_ = tracker_sparql_query_current (self);
8512 #line 872 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8513 _tmp36_ = _tmp41_ == TRACKER_SPARQL_TOKEN_TYPE_DOUBLE;
8514 #line 8515 "tracker-sparql-query.c"
8515 }
8516 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8517 _tmp42_ = _tmp36_;
8518 #line 870 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8519 if (_tmp42_) {
8520 #line 8521 "tracker-sparql-query.c"
8521 gchar* _tmp43_ = NULL;
8522 gchar* _tmp44_;
8523 gchar* _tmp45_;
8524 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8525 tracker_sparql_query_next (self, &_inner_error_);
8526 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8527 if (_inner_error_ != NULL) {
8528 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8529 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8530 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8531 g_propagate_error (error, _inner_error_);
8532 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8533 _g_free0 (_result_);
8534 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8535 return NULL;
8536 #line 8537 "tracker-sparql-query.c"
8537 } else {
8538 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8539 _g_free0 (_result_);
8540 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8541 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8542 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8543 g_clear_error (&_inner_error_);
8544 #line 873 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8545 return NULL;
8546 #line 8547 "tracker-sparql-query.c"
8547 }
8548 }
8549 #line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8550 _tmp43_ = tracker_sparql_query_get_last_string (self, 0);
8551 #line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8552 _tmp44_ = _tmp43_;
8553 #line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8554 _tmp45_ = g_strconcat ("-", _tmp44_, NULL);
8555 #line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8556 _g_free0 (_result_);
8557 #line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8558 _result_ = _tmp45_;
8559 #line 874 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8560 _g_free0 (_tmp44_);
8561 #line 8562 "tracker-sparql-query.c"
8562 } else {
8563 GError* _tmp46_ = NULL;
8564 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8565 _tmp46_ = tracker_sparql_query_get_error (self, "expected variable or term");
8566 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8567 _inner_error_ = _tmp46_;
8568 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8569 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8570 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8571 g_propagate_error (error, _inner_error_);
8572 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8573 _g_free0 (_result_);
8574 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8575 return NULL;
8576 #line 8577 "tracker-sparql-query.c"
8577 } else {
8578 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8579 _g_free0 (_result_);
8580 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8581 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8582 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8583 g_clear_error (&_inner_error_);
8584 #line 876 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8585 return NULL;
8586 #line 8587 "tracker-sparql-query.c"
8587 }
8588 }
8589 } else {
8590 TrackerSparqlTokenType _tmp47_ = 0;
8591 #line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8592 _tmp47_ = tracker_sparql_query_current (self);
8593 #line 878 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8594 if (_tmp47_ == TRACKER_SPARQL_TOKEN_TYPE_INTEGER) {
8595 #line 8596 "tracker-sparql-query.c"
8596 gchar* _tmp48_ = NULL;
8597 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8598 tracker_sparql_query_next (self, &_inner_error_);
8599 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8600 if (_inner_error_ != NULL) {
8601 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8602 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8603 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8604 g_propagate_error (error, _inner_error_);
8605 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8606 _g_free0 (_result_);
8607 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8608 return NULL;
8609 #line 8610 "tracker-sparql-query.c"
8610 } else {
8611 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8612 _g_free0 (_result_);
8613 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8614 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8615 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8616 g_clear_error (&_inner_error_);
8617 #line 879 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8618 return NULL;
8619 #line 8620 "tracker-sparql-query.c"
8620 }
8621 }
8622 #line 880 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8623 _tmp48_ = tracker_sparql_query_get_last_string (self, 0);
8624 #line 880 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8625 _g_free0 (_result_);
8626 #line 880 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8627 _result_ = _tmp48_;
8628 #line 8629 "tracker-sparql-query.c"
8629 } else {
8630 TrackerSparqlTokenType _tmp49_ = 0;
8631 #line 881 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8632 _tmp49_ = tracker_sparql_query_current (self);
8633 #line 881 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8634 if (_tmp49_ == TRACKER_SPARQL_TOKEN_TYPE_NULL) {
8635 #line 8636 "tracker-sparql-query.c"
8636 gchar* _tmp50_;
8637 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8638 tracker_sparql_query_next (self, &_inner_error_);
8639 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8640 if (_inner_error_ != NULL) {
8641 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8642 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8643 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8644 g_propagate_error (error, _inner_error_);
8645 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8646 _g_free0 (_result_);
8647 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8648 return NULL;
8649 #line 8650 "tracker-sparql-query.c"
8650 } else {
8651 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8652 _g_free0 (_result_);
8653 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8654 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8655 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8656 g_clear_error (&_inner_error_);
8657 #line 882 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8658 return NULL;
8659 #line 8660 "tracker-sparql-query.c"
8660 }
8661 }
8662 #line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8663 _tmp50_ = g_strdup ("null");
8664 #line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8665 _g_free0 (_result_);
8666 #line 883 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8667 _result_ = _tmp50_;
8668 #line 884 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8669 _vala_is_null = TRUE;
8670 #line 8671 "tracker-sparql-query.c"
8671 } else {
8672 TrackerSparqlTokenType _tmp51_ = 0;
8673 #line 885 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8674 _tmp51_ = tracker_sparql_query_current (self);
8675 #line 885 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8676 if (_tmp51_ == TRACKER_SPARQL_TOKEN_TYPE_DECIMAL) {
8677 #line 8678 "tracker-sparql-query.c"
8678 gchar* _tmp52_ = NULL;
8679 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8680 tracker_sparql_query_next (self, &_inner_error_);
8681 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8682 if (_inner_error_ != NULL) {
8683 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8684 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8685 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8686 g_propagate_error (error, _inner_error_);
8687 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8688 _g_free0 (_result_);
8689 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8690 return NULL;
8691 #line 8692 "tracker-sparql-query.c"
8692 } else {
8693 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8694 _g_free0 (_result_);
8695 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8696 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8697 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8698 g_clear_error (&_inner_error_);
8699 #line 886 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8700 return NULL;
8701 #line 8702 "tracker-sparql-query.c"
8702 }
8703 }
8704 #line 887 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8705 _tmp52_ = tracker_sparql_query_get_last_string (self, 0);
8706 #line 887 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8707 _g_free0 (_result_);
8708 #line 887 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8709 _result_ = _tmp52_;
8710 #line 8711 "tracker-sparql-query.c"
8711 } else {
8712 TrackerSparqlTokenType _tmp53_ = 0;
8713 #line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8714 _tmp53_ = tracker_sparql_query_current (self);
8715 #line 888 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8716 if (_tmp53_ == TRACKER_SPARQL_TOKEN_TYPE_DOUBLE) {
8717 #line 8718 "tracker-sparql-query.c"
8718 gchar* _tmp54_ = NULL;
8719 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8720 tracker_sparql_query_next (self, &_inner_error_);
8721 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8722 if (_inner_error_ != NULL) {
8723 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8724 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8725 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8726 g_propagate_error (error, _inner_error_);
8727 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8728 _g_free0 (_result_);
8729 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8730 return NULL;
8731 #line 8732 "tracker-sparql-query.c"
8732 } else {
8733 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8734 _g_free0 (_result_);
8735 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8736 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8737 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8738 g_clear_error (&_inner_error_);
8739 #line 889 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8740 return NULL;
8741 #line 8742 "tracker-sparql-query.c"
8742 }
8743 }
8744 #line 890 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8745 _tmp54_ = tracker_sparql_query_get_last_string (self, 0);
8746 #line 890 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8747 _g_free0 (_result_);
8748 #line 890 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8749 _result_ = _tmp54_;
8750 #line 8751 "tracker-sparql-query.c"
8751 } else {
8752 TrackerSparqlTokenType _tmp55_ = 0;
8753 #line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8754 _tmp55_ = tracker_sparql_query_current (self);
8755 #line 891 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8756 if (_tmp55_ == TRACKER_SPARQL_TOKEN_TYPE_TRUE) {
8757 #line 8758 "tracker-sparql-query.c"
8758 gchar* _tmp56_;
8759 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8760 tracker_sparql_query_next (self, &_inner_error_);
8761 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8762 if (_inner_error_ != NULL) {
8763 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8764 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8765 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8766 g_propagate_error (error, _inner_error_);
8767 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8768 _g_free0 (_result_);
8769 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8770 return NULL;
8771 #line 8772 "tracker-sparql-query.c"
8772 } else {
8773 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8774 _g_free0 (_result_);
8775 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8776 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8777 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8778 g_clear_error (&_inner_error_);
8779 #line 892 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8780 return NULL;
8781 #line 8782 "tracker-sparql-query.c"
8782 }
8783 }
8784 #line 893 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8785 _tmp56_ = g_strdup ("true");
8786 #line 893 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8787 _g_free0 (_result_);
8788 #line 893 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8789 _result_ = _tmp56_;
8790 #line 8791 "tracker-sparql-query.c"
8791 } else {
8792 TrackerSparqlTokenType _tmp57_ = 0;
8793 #line 894 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8794 _tmp57_ = tracker_sparql_query_current (self);
8795 #line 894 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8796 if (_tmp57_ == TRACKER_SPARQL_TOKEN_TYPE_FALSE) {
8797 #line 8798 "tracker-sparql-query.c"
8798 gchar* _tmp58_;
8799 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8800 tracker_sparql_query_next (self, &_inner_error_);
8801 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8802 if (_inner_error_ != NULL) {
8803 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8804 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8805 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8806 g_propagate_error (error, _inner_error_);
8807 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8808 _g_free0 (_result_);
8809 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8810 return NULL;
8811 #line 8812 "tracker-sparql-query.c"
8812 } else {
8813 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8814 _g_free0 (_result_);
8815 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8816 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8817 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8818 g_clear_error (&_inner_error_);
8819 #line 895 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8820 return NULL;
8821 #line 8822 "tracker-sparql-query.c"
8822 }
8823 }
8824 #line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8825 _tmp58_ = g_strdup ("false");
8826 #line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8827 _g_free0 (_result_);
8828 #line 896 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8829 _result_ = _tmp58_;
8830 #line 8831 "tracker-sparql-query.c"
8831 } else {
8832 TrackerSparqlTokenType _tmp59_ = 0;
8833 #line 897 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8834 _tmp59_ = tracker_sparql_query_current (self);
8835 #line 897 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8836 if (_tmp59_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL1) {
8837 #line 8838 "tracker-sparql-query.c"
8838 TrackerSparqlExpression* _tmp60_;
8839 gchar* _tmp61_ = NULL;
8840 gchar* _tmp62_;
8841 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8842 _tmp60_ = self->expression;
8843 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8844 _tmp61_ = tracker_sparql_expression_parse_string_literal (_tmp60_, NULL, &_inner_error_);
8845 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8846 _tmp62_ = _tmp61_;
8847 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8848 if (_inner_error_ != NULL) {
8849 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8850 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8851 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8852 g_propagate_error (error, _inner_error_);
8853 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8854 _g_free0 (_result_);
8855 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8856 return NULL;
8857 #line 8858 "tracker-sparql-query.c"
8858 } else {
8859 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8860 _g_free0 (_result_);
8861 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8862 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8863 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8864 g_clear_error (&_inner_error_);
8865 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8866 return NULL;
8867 #line 8868 "tracker-sparql-query.c"
8868 }
8869 }
8870 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8871 _g_free0 (_result_);
8872 #line 898 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8873 _result_ = _tmp62_;
8874 #line 8875 "tracker-sparql-query.c"
8875 } else {
8876 TrackerSparqlTokenType _tmp63_ = 0;
8877 #line 899 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8878 _tmp63_ = tracker_sparql_query_current (self);
8879 #line 899 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8880 if (_tmp63_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL2) {
8881 #line 8882 "tracker-sparql-query.c"
8882 TrackerSparqlExpression* _tmp64_;
8883 gchar* _tmp65_ = NULL;
8884 gchar* _tmp66_;
8885 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8886 _tmp64_ = self->expression;
8887 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8888 _tmp65_ = tracker_sparql_expression_parse_string_literal (_tmp64_, NULL, &_inner_error_);
8889 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8890 _tmp66_ = _tmp65_;
8891 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8892 if (_inner_error_ != NULL) {
8893 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8894 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8895 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8896 g_propagate_error (error, _inner_error_);
8897 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8898 _g_free0 (_result_);
8899 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8900 return NULL;
8901 #line 8902 "tracker-sparql-query.c"
8902 } else {
8903 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8904 _g_free0 (_result_);
8905 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8906 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8907 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8908 g_clear_error (&_inner_error_);
8909 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8910 return NULL;
8911 #line 8912 "tracker-sparql-query.c"
8912 }
8913 }
8914 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8915 _g_free0 (_result_);
8916 #line 900 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8917 _result_ = _tmp66_;
8918 #line 8919 "tracker-sparql-query.c"
8919 } else {
8920 TrackerSparqlTokenType _tmp67_ = 0;
8921 #line 901 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8922 _tmp67_ = tracker_sparql_query_current (self);
8923 #line 901 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8924 if (_tmp67_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG1) {
8925 #line 8926 "tracker-sparql-query.c"
8926 TrackerSparqlExpression* _tmp68_;
8927 gchar* _tmp69_ = NULL;
8928 gchar* _tmp70_;
8929 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8930 _tmp68_ = self->expression;
8931 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8932 _tmp69_ = tracker_sparql_expression_parse_string_literal (_tmp68_, NULL, &_inner_error_);
8933 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8934 _tmp70_ = _tmp69_;
8935 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8936 if (_inner_error_ != NULL) {
8937 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8938 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8939 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8940 g_propagate_error (error, _inner_error_);
8941 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8942 _g_free0 (_result_);
8943 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8944 return NULL;
8945 #line 8946 "tracker-sparql-query.c"
8946 } else {
8947 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8948 _g_free0 (_result_);
8949 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8950 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8951 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8952 g_clear_error (&_inner_error_);
8953 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8954 return NULL;
8955 #line 8956 "tracker-sparql-query.c"
8956 }
8957 }
8958 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8959 _g_free0 (_result_);
8960 #line 902 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8961 _result_ = _tmp70_;
8962 #line 8963 "tracker-sparql-query.c"
8963 } else {
8964 TrackerSparqlTokenType _tmp71_ = 0;
8965 #line 903 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8966 _tmp71_ = tracker_sparql_query_current (self);
8967 #line 903 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8968 if (_tmp71_ == TRACKER_SPARQL_TOKEN_TYPE_STRING_LITERAL_LONG2) {
8969 #line 8970 "tracker-sparql-query.c"
8970 TrackerSparqlExpression* _tmp72_;
8971 gchar* _tmp73_ = NULL;
8972 gchar* _tmp74_;
8973 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8974 _tmp72_ = self->expression;
8975 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8976 _tmp73_ = tracker_sparql_expression_parse_string_literal (_tmp72_, NULL, &_inner_error_);
8977 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8978 _tmp74_ = _tmp73_;
8979 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8980 if (_inner_error_ != NULL) {
8981 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8982 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
8983 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8984 g_propagate_error (error, _inner_error_);
8985 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8986 _g_free0 (_result_);
8987 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8988 return NULL;
8989 #line 8990 "tracker-sparql-query.c"
8990 } else {
8991 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8992 _g_free0 (_result_);
8993 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8994 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
8995 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8996 g_clear_error (&_inner_error_);
8997 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
8998 return NULL;
8999 #line 9000 "tracker-sparql-query.c"
9000 }
9001 }
9002 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9003 _g_free0 (_result_);
9004 #line 904 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9005 _result_ = _tmp74_;
9006 #line 9007 "tracker-sparql-query.c"
9007 } else {
9008 TrackerSparqlTokenType _tmp75_ = 0;
9009 #line 905 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9010 _tmp75_ = tracker_sparql_query_current (self);
9011 #line 905 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9012 if (_tmp75_ == TRACKER_SPARQL_TOKEN_TYPE_OPEN_BRACKET) {
9013 #line 9014 "tracker-sparql-query.c"
9014 gboolean _tmp76_;
9015 gchar* _tmp78_ = NULL;
9016 const gchar* _tmp79_;
9017 gchar* _tmp80_;
9018 gchar* old_subject;
9019 gboolean _tmp81_;
9020 gboolean old_subject_is_var;
9021 const gchar* _tmp82_;
9022 gchar* _tmp83_;
9023 TrackerSparqlSolution* _tmp84_;
9024 const gchar* _tmp85_;
9025 gchar* _tmp86_;
9026 gboolean _tmp87_;
9027 #line 907 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9028 _tmp76_ = self->priv->anon_blank_node_open;
9029 #line 907 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9030 if (_tmp76_) {
9031 #line 9032 "tracker-sparql-query.c"
9032 GError* _tmp77_ = NULL;
9033 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9034 _tmp77_ = tracker_sparql_query_get_error (self, "no support for nested anonymous blank nodes");
9035 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9036 _inner_error_ = _tmp77_;
9037 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9038 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9039 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9040 g_propagate_error (error, _inner_error_);
9041 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9042 _g_free0 (_result_);
9043 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9044 return NULL;
9045 #line 9046 "tracker-sparql-query.c"
9046 } else {
9047 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9048 _g_free0 (_result_);
9049 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9050 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9051 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9052 g_clear_error (&_inner_error_);
9053 #line 908 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9054 return NULL;
9055 #line 9056 "tracker-sparql-query.c"
9056 }
9057 }
9058 #line 911 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9059 self->priv->anon_blank_node_open = TRUE;
9060 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9061 tracker_sparql_query_next (self, &_inner_error_);
9062 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9063 if (_inner_error_ != NULL) {
9064 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9065 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9066 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9067 g_propagate_error (error, _inner_error_);
9068 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9069 _g_free0 (_result_);
9070 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9071 return NULL;
9072 #line 9073 "tracker-sparql-query.c"
9073 } else {
9074 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9075 _g_free0 (_result_);
9076 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9077 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9078 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9079 g_clear_error (&_inner_error_);
9080 #line 912 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9081 return NULL;
9082 #line 9083 "tracker-sparql-query.c"
9083 }
9084 }
9085 #line 914 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9086 _tmp78_ = tracker_sparql_query_generate_bnodeid (self, NULL);
9087 #line 914 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9088 _g_free0 (_result_);
9089 #line 914 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9090 _result_ = _tmp78_;
9091 #line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9092 _tmp79_ = self->priv->current_subject;
9093 #line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9094 _tmp80_ = g_strdup (_tmp79_);
9095 #line 916 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9096 old_subject = _tmp80_;
9097 #line 917 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9098 _tmp81_ = self->priv->current_subject_is_var;
9099 #line 917 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9100 old_subject_is_var = _tmp81_;
9101 #line 919 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9102 _tmp82_ = _result_;
9103 #line 919 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9104 _tmp83_ = g_strdup (_tmp82_);
9105 #line 919 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9106 _g_free0 (self->priv->current_subject);
9107 #line 919 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9108 self->priv->current_subject = _tmp83_;
9109 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9110 _tmp84_ = var_value_map;
9111 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9112 tracker_sparql_query_parse_construct_property_list_not_empty (self, _tmp84_, &_inner_error_);
9113 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9114 if (_inner_error_ != NULL) {
9115 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9116 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9117 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9118 g_propagate_error (error, _inner_error_);
9119 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9120 _g_free0 (old_subject);
9121 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9122 _g_free0 (_result_);
9123 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9124 return NULL;
9125 #line 9126 "tracker-sparql-query.c"
9126 } else {
9127 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9128 _g_free0 (old_subject);
9129 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9130 _g_free0 (_result_);
9131 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9132 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9133 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9134 g_clear_error (&_inner_error_);
9135 #line 920 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9136 return NULL;
9137 #line 9138 "tracker-sparql-query.c"
9138 }
9139 }
9140 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9141 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_CLOSE_BRACKET, &_inner_error_);
9142 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9143 if (_inner_error_ != NULL) {
9144 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9145 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9146 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9147 g_propagate_error (error, _inner_error_);
9148 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9149 _g_free0 (old_subject);
9150 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9151 _g_free0 (_result_);
9152 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9153 return NULL;
9154 #line 9155 "tracker-sparql-query.c"
9155 } else {
9156 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9157 _g_free0 (old_subject);
9158 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9159 _g_free0 (_result_);
9160 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9161 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9162 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9163 g_clear_error (&_inner_error_);
9164 #line 921 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9165 return NULL;
9166 #line 9167 "tracker-sparql-query.c"
9167 }
9168 }
9169 #line 922 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9170 self->priv->anon_blank_node_open = FALSE;
9171 #line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9172 _tmp85_ = old_subject;
9173 #line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9174 _tmp86_ = g_strdup (_tmp85_);
9175 #line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9176 _g_free0 (self->priv->current_subject);
9177 #line 924 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9178 self->priv->current_subject = _tmp86_;
9179 #line 925 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9180 _tmp87_ = old_subject_is_var;
9181 #line 925 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9182 self->priv->current_subject_is_var = _tmp87_;
9183 #line 905 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9184 _g_free0 (old_subject);
9185 #line 9186 "tracker-sparql-query.c"
9186 } else {
9187 GError* _tmp88_ = NULL;
9188 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9189 _tmp88_ = tracker_sparql_query_get_error (self, "expected variable or term");
9190 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9191 _inner_error_ = _tmp88_;
9192 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9193 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9194 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9195 g_propagate_error (error, _inner_error_);
9196 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9197 _g_free0 (_result_);
9198 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9199 return NULL;
9200 #line 9201 "tracker-sparql-query.c"
9201 } else {
9202 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9203 _g_free0 (_result_);
9204 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9205 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9206 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9207 g_clear_error (&_inner_error_);
9208 #line 927 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9209 return NULL;
9210 #line 9211 "tracker-sparql-query.c"
9211 }
9212 }
9213 }
9214 }
9215 }
9216 }
9217 }
9218 }
9219 }
9220 }
9221 }
9222 }
9223 }
9224 }
9225 }
9226 }
9227 }
9228 }
9229 #line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9230 result = _result_;
9231 #line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9232 if (is_null) {
9233 #line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9234 *is_null = _vala_is_null;
9235 #line 9236 "tracker-sparql-query.c"
9236 }
9237 #line 929 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9238 return result;
9239 #line 9240 "tracker-sparql-query.c"
9240 }
9241
9242
9243 static void tracker_sparql_query_parse_construct_property_list_not_empty (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error) {
9244 GError * _inner_error_ = NULL;
9245 #line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9246 g_return_if_fail (self != NULL);
9247 #line 932 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9248 g_return_if_fail (var_value_map != NULL);
9249 #line 933 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9250 while (TRUE) {
9251 #line 9252 "tracker-sparql-query.c"
9252 const gchar* _tmp0_;
9253 gchar* _tmp1_;
9254 gchar* old_predicate;
9255 TrackerSparqlTokenType _tmp2_ = 0;
9256 TrackerSparqlSolution* _tmp32_;
9257 const gchar* _tmp33_;
9258 gchar* _tmp34_;
9259 gboolean _tmp35_ = FALSE;
9260 gboolean _tmp36_;
9261 #line 934 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9262 _tmp0_ = self->priv->current_predicate;
9263 #line 934 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9264 _tmp1_ = g_strdup (_tmp0_);
9265 #line 934 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9266 old_predicate = _tmp1_;
9267 #line 936 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9268 _g_free0 (self->priv->current_predicate);
9269 #line 936 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9270 self->priv->current_predicate = NULL;
9271 #line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9272 _tmp2_ = tracker_sparql_query_current (self);
9273 #line 937 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9274 if (_tmp2_ == TRACKER_SPARQL_TOKEN_TYPE_VAR) {
9275 #line 9276 "tracker-sparql-query.c"
9276 TrackerSparqlSolution* _tmp3_;
9277 gchar* _tmp4_ = NULL;
9278 gchar* _tmp5_;
9279 gchar* _tmp6_ = NULL;
9280 gchar* _tmp7_;
9281 gchar* _tmp8_ = NULL;
9282 #line 938 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9283 self->priv->current_predicate_is_var = TRUE;
9284 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9285 tracker_sparql_query_next (self, &_inner_error_);
9286 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9287 if (_inner_error_ != NULL) {
9288 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9289 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9290 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9291 g_propagate_error (error, _inner_error_);
9292 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9293 _g_free0 (old_predicate);
9294 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9295 return;
9296 #line 9297 "tracker-sparql-query.c"
9297 } else {
9298 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9299 _g_free0 (old_predicate);
9300 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9301 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9302 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9303 g_clear_error (&_inner_error_);
9304 #line 939 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9305 return;
9306 #line 9307 "tracker-sparql-query.c"
9307 }
9308 }
9309 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9310 _tmp3_ = var_value_map;
9311 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9312 _tmp4_ = tracker_sparql_query_get_last_string (self, 0);
9313 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9314 _tmp5_ = _tmp4_;
9315 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9316 _tmp6_ = string_substring (_tmp5_, (glong) 1, (glong) (-1));
9317 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9318 _tmp7_ = _tmp6_;
9319 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9320 _tmp8_ = tracker_sparql_solution_lookup (_tmp3_, _tmp7_);
9321 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9322 _g_free0 (self->priv->current_predicate);
9323 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9324 self->priv->current_predicate = _tmp8_;
9325 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9326 _g_free0 (_tmp7_);
9327 #line 940 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9328 _g_free0 (_tmp5_);
9329 #line 9330 "tracker-sparql-query.c"
9330 } else {
9331 TrackerSparqlTokenType _tmp9_ = 0;
9332 #line 941 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9333 _tmp9_ = tracker_sparql_query_current (self);
9334 #line 941 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9335 if (_tmp9_ == TRACKER_SPARQL_TOKEN_TYPE_IRI_REF) {
9336 #line 9337 "tracker-sparql-query.c"
9337 gchar* _tmp10_ = NULL;
9338 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9339 tracker_sparql_query_next (self, &_inner_error_);
9340 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9341 if (_inner_error_ != NULL) {
9342 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9343 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9344 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9345 g_propagate_error (error, _inner_error_);
9346 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9347 _g_free0 (old_predicate);
9348 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9349 return;
9350 #line 9351 "tracker-sparql-query.c"
9351 } else {
9352 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9353 _g_free0 (old_predicate);
9354 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9355 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9356 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9357 g_clear_error (&_inner_error_);
9358 #line 942 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9359 return;
9360 #line 9361 "tracker-sparql-query.c"
9361 }
9362 }
9363 #line 943 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9364 _tmp10_ = tracker_sparql_query_get_last_string (self, 1);
9365 #line 943 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9366 _g_free0 (self->priv->current_predicate);
9367 #line 943 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9368 self->priv->current_predicate = _tmp10_;
9369 #line 9370 "tracker-sparql-query.c"
9370 } else {
9371 TrackerSparqlTokenType _tmp11_ = 0;
9372 #line 944 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9373 _tmp11_ = tracker_sparql_query_current (self);
9374 #line 944 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9375 if (_tmp11_ == TRACKER_SPARQL_TOKEN_TYPE_PN_PREFIX) {
9376 #line 9377 "tracker-sparql-query.c"
9377 gchar* _tmp12_ = NULL;
9378 gchar* ns;
9379 const gchar* _tmp13_;
9380 gchar* _tmp14_ = NULL;
9381 gchar* _tmp15_;
9382 gchar* _tmp16_ = NULL;
9383 gchar* _tmp17_;
9384 gchar* _tmp18_ = NULL;
9385 gchar* _tmp19_;
9386 gchar* _tmp20_;
9387 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9388 tracker_sparql_query_next (self, &_inner_error_);
9389 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9390 if (_inner_error_ != NULL) {
9391 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9392 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9393 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9394 g_propagate_error (error, _inner_error_);
9395 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9396 _g_free0 (old_predicate);
9397 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9398 return;
9399 #line 9400 "tracker-sparql-query.c"
9400 } else {
9401 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9402 _g_free0 (old_predicate);
9403 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9404 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9405 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9406 g_clear_error (&_inner_error_);
9407 #line 945 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9408 return;
9409 #line 9410 "tracker-sparql-query.c"
9410 }
9411 }
9412 #line 946 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9413 _tmp12_ = tracker_sparql_query_get_last_string (self, 0);
9414 #line 946 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9415 ns = _tmp12_;
9416 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9417 tracker_sparql_query_expect (self, TRACKER_SPARQL_TOKEN_TYPE_COLON, &_inner_error_);
9418 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9419 if (_inner_error_ != NULL) {
9420 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9421 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9422 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9423 g_propagate_error (error, _inner_error_);
9424 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9425 _g_free0 (ns);
9426 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9427 _g_free0 (old_predicate);
9428 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9429 return;
9430 #line 9431 "tracker-sparql-query.c"
9431 } else {
9432 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9433 _g_free0 (ns);
9434 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9435 _g_free0 (old_predicate);
9436 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9437 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9438 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9439 g_clear_error (&_inner_error_);
9440 #line 947 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9441 return;
9442 #line 9443 "tracker-sparql-query.c"
9443 }
9444 }
9445 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9446 _tmp13_ = ns;
9447 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9448 _tmp14_ = tracker_sparql_query_get_last_string (self, 0);
9449 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9450 _tmp15_ = _tmp14_;
9451 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9452 _tmp16_ = string_substring (_tmp15_, (glong) 1, (glong) (-1));
9453 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9454 _tmp17_ = _tmp16_;
9455 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9456 _tmp18_ = tracker_sparql_query_resolve_prefixed_name (self, _tmp13_, _tmp17_, &_inner_error_);
9457 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9458 _tmp19_ = _tmp18_;
9459 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9460 _g_free0 (_tmp17_);
9461 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9462 _g_free0 (_tmp15_);
9463 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9464 _tmp20_ = _tmp19_;
9465 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9466 if (_inner_error_ != NULL) {
9467 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9468 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9469 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9470 g_propagate_error (error, _inner_error_);
9471 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9472 _g_free0 (ns);
9473 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9474 _g_free0 (old_predicate);
9475 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9476 return;
9477 #line 9478 "tracker-sparql-query.c"
9478 } else {
9479 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9480 _g_free0 (ns);
9481 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9482 _g_free0 (old_predicate);
9483 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9484 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9485 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9486 g_clear_error (&_inner_error_);
9487 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9488 return;
9489 #line 9490 "tracker-sparql-query.c"
9490 }
9491 }
9492 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9493 _g_free0 (self->priv->current_predicate);
9494 #line 948 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9495 self->priv->current_predicate = _tmp20_;
9496 #line 944 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9497 _g_free0 (ns);
9498 #line 9499 "tracker-sparql-query.c"
9499 } else {
9500 TrackerSparqlTokenType _tmp21_ = 0;
9501 #line 949 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9502 _tmp21_ = tracker_sparql_query_current (self);
9503 #line 949 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9504 if (_tmp21_ == TRACKER_SPARQL_TOKEN_TYPE_COLON) {
9505 #line 9506 "tracker-sparql-query.c"
9506 gchar* _tmp22_ = NULL;
9507 gchar* _tmp23_;
9508 gchar* _tmp24_ = NULL;
9509 gchar* _tmp25_;
9510 gchar* _tmp26_ = NULL;
9511 gchar* _tmp27_;
9512 gchar* _tmp28_;
9513 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9514 tracker_sparql_query_next (self, &_inner_error_);
9515 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9516 if (_inner_error_ != NULL) {
9517 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9518 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9519 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9520 g_propagate_error (error, _inner_error_);
9521 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9522 _g_free0 (old_predicate);
9523 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9524 return;
9525 #line 9526 "tracker-sparql-query.c"
9526 } else {
9527 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9528 _g_free0 (old_predicate);
9529 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9530 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9531 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9532 g_clear_error (&_inner_error_);
9533 #line 950 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9534 return;
9535 #line 9536 "tracker-sparql-query.c"
9536 }
9537 }
9538 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9539 _tmp22_ = tracker_sparql_query_get_last_string (self, 0);
9540 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9541 _tmp23_ = _tmp22_;
9542 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9543 _tmp24_ = string_substring (_tmp23_, (glong) 1, (glong) (-1));
9544 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9545 _tmp25_ = _tmp24_;
9546 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9547 _tmp26_ = tracker_sparql_query_resolve_prefixed_name (self, "", _tmp25_, &_inner_error_);
9548 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9549 _tmp27_ = _tmp26_;
9550 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9551 _g_free0 (_tmp25_);
9552 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9553 _g_free0 (_tmp23_);
9554 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9555 _tmp28_ = _tmp27_;
9556 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9557 if (_inner_error_ != NULL) {
9558 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9559 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9560 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9561 g_propagate_error (error, _inner_error_);
9562 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9563 _g_free0 (old_predicate);
9564 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9565 return;
9566 #line 9567 "tracker-sparql-query.c"
9567 } else {
9568 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9569 _g_free0 (old_predicate);
9570 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9571 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9572 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9573 g_clear_error (&_inner_error_);
9574 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9575 return;
9576 #line 9577 "tracker-sparql-query.c"
9577 }
9578 }
9579 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9580 _g_free0 (self->priv->current_predicate);
9581 #line 951 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9582 self->priv->current_predicate = _tmp28_;
9583 #line 9584 "tracker-sparql-query.c"
9584 } else {
9585 TrackerSparqlTokenType _tmp29_ = 0;
9586 #line 952 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9587 _tmp29_ = tracker_sparql_query_current (self);
9588 #line 952 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9589 if (_tmp29_ == TRACKER_SPARQL_TOKEN_TYPE_A) {
9590 #line 9591 "tracker-sparql-query.c"
9591 gchar* _tmp30_;
9592 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9593 tracker_sparql_query_next (self, &_inner_error_);
9594 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9595 if (_inner_error_ != NULL) {
9596 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9597 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9598 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9599 g_propagate_error (error, _inner_error_);
9600 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9601 _g_free0 (old_predicate);
9602 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9603 return;
9604 #line 9605 "tracker-sparql-query.c"
9605 } else {
9606 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9607 _g_free0 (old_predicate);
9608 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9609 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9610 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9611 g_clear_error (&_inner_error_);
9612 #line 953 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9613 return;
9614 #line 9615 "tracker-sparql-query.c"
9615 }
9616 }
9617 #line 954 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9618 _tmp30_ = g_strdup ("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
9619 #line 954 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9620 _g_free0 (self->priv->current_predicate);
9621 #line 954 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9622 self->priv->current_predicate = _tmp30_;
9623 #line 9624 "tracker-sparql-query.c"
9624 } else {
9625 GError* _tmp31_ = NULL;
9626 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9627 _tmp31_ = tracker_sparql_query_get_error (self, "expected non-empty property list");
9628 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9629 _inner_error_ = _tmp31_;
9630 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9631 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9632 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9633 g_propagate_error (error, _inner_error_);
9634 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9635 _g_free0 (old_predicate);
9636 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9637 return;
9638 #line 9639 "tracker-sparql-query.c"
9639 } else {
9640 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9641 _g_free0 (old_predicate);
9642 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9643 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9644 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9645 g_clear_error (&_inner_error_);
9646 #line 956 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9647 return;
9648 #line 9649 "tracker-sparql-query.c"
9649 }
9650 }
9651 }
9652 }
9653 }
9654 }
9655 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9656 _tmp32_ = var_value_map;
9657 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9658 tracker_sparql_query_parse_construct_object_list (self, _tmp32_, &_inner_error_);
9659 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9660 if (_inner_error_ != NULL) {
9661 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9662 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9663 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9664 g_propagate_error (error, _inner_error_);
9665 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9666 _g_free0 (old_predicate);
9667 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9668 return;
9669 #line 9670 "tracker-sparql-query.c"
9670 } else {
9671 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9672 _g_free0 (old_predicate);
9673 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9674 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9675 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9676 g_clear_error (&_inner_error_);
9677 #line 958 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9678 return;
9679 #line 9680 "tracker-sparql-query.c"
9680 }
9681 }
9682 #line 960 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9683 _tmp33_ = old_predicate;
9684 #line 960 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9685 _tmp34_ = g_strdup (_tmp33_);
9686 #line 960 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9687 _g_free0 (self->priv->current_predicate);
9688 #line 960 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9689 self->priv->current_predicate = _tmp34_;
9690 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9691 _tmp35_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_SEMICOLON, &_inner_error_);
9692 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9693 _tmp36_ = _tmp35_;
9694 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9695 if (_inner_error_ != NULL) {
9696 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9697 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9698 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9699 g_propagate_error (error, _inner_error_);
9700 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9701 _g_free0 (old_predicate);
9702 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9703 return;
9704 #line 9705 "tracker-sparql-query.c"
9705 } else {
9706 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9707 _g_free0 (old_predicate);
9708 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9709 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9710 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9711 g_clear_error (&_inner_error_);
9712 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9713 return;
9714 #line 9715 "tracker-sparql-query.c"
9715 }
9716 }
9717 #line 962 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9718 if (_tmp36_) {
9719 #line 963 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9720 _g_free0 (old_predicate);
9721 #line 963 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9722 continue;
9723 #line 9724 "tracker-sparql-query.c"
9724 }
9725 #line 965 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9726 _g_free0 (old_predicate);
9727 #line 965 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9728 break;
9729 #line 9730 "tracker-sparql-query.c"
9730 }
9731 }
9732
9733
9734 static void tracker_sparql_query_parse_construct_object_list (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error) {
9735 GError * _inner_error_ = NULL;
9736 #line 969 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9737 g_return_if_fail (self != NULL);
9738 #line 969 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9739 g_return_if_fail (var_value_map != NULL);
9740 #line 970 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9741 while (TRUE) {
9742 #line 9743 "tracker-sparql-query.c"
9743 TrackerSparqlSolution* _tmp0_;
9744 gboolean _tmp1_ = FALSE;
9745 gboolean _tmp2_;
9746 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9747 _tmp0_ = var_value_map;
9748 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9749 tracker_sparql_query_parse_construct_object (self, _tmp0_, &_inner_error_);
9750 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9751 if (_inner_error_ != NULL) {
9752 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9753 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9754 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9755 g_propagate_error (error, _inner_error_);
9756 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9757 return;
9758 #line 9759 "tracker-sparql-query.c"
9759 } else {
9760 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9761 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9762 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9763 g_clear_error (&_inner_error_);
9764 #line 971 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9765 return;
9766 #line 9767 "tracker-sparql-query.c"
9767 }
9768 }
9769 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9770 _tmp1_ = tracker_sparql_query_accept (self, TRACKER_SPARQL_TOKEN_TYPE_COMMA, &_inner_error_);
9771 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9772 _tmp2_ = _tmp1_;
9773 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9774 if (_inner_error_ != NULL) {
9775 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9776 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9777 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9778 g_propagate_error (error, _inner_error_);
9779 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9780 return;
9781 #line 9782 "tracker-sparql-query.c"
9782 } else {
9783 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9784 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9785 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9786 g_clear_error (&_inner_error_);
9787 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9788 return;
9789 #line 9790 "tracker-sparql-query.c"
9790 }
9791 }
9792 #line 972 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9793 if (_tmp2_) {
9794 #line 973 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9795 continue;
9796 #line 9797 "tracker-sparql-query.c"
9797 }
9798 #line 975 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9799 break;
9800 #line 9801 "tracker-sparql-query.c"
9801 }
9802 }
9803
9804
9805 static gpointer _g_error_copy0 (gpointer self) {
9806 #line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9807 return self ? g_error_copy (self) : NULL;
9808 #line 9809 "tracker-sparql-query.c"
9809 }
9810
9811
9812 static void tracker_sparql_query_parse_construct_object (TrackerSparqlQuery* self, TrackerSparqlSolution* var_value_map, GError** error) {
9813 gboolean is_null;
9814 TrackerSparqlSolution* _tmp0_;
9815 gboolean _tmp1_ = FALSE;
9816 gchar* _tmp2_ = NULL;
9817 gchar* object;
9818 gboolean _tmp3_ = FALSE;
9819 gboolean _tmp4_ = FALSE;
9820 const gchar* _tmp5_;
9821 gboolean _tmp7_;
9822 gboolean _tmp9_;
9823 GError * _inner_error_ = NULL;
9824 #line 979 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9825 g_return_if_fail (self != NULL);
9826 #line 979 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9827 g_return_if_fail (var_value_map != NULL);
9828 #line 980 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9829 is_null = FALSE;
(emitted by clang-analyzer)TODO: a detailed trace is available in the data model (not yet rendered in this report)
9830 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9831 _tmp0_ = var_value_map;
9832 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9833 _tmp2_ = tracker_sparql_query_parse_construct_var_or_term (self, _tmp0_, &_tmp1_, &_inner_error_);
9834 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9835 is_null = _tmp1_;
9836 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9837 object = _tmp2_;
9838 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9839 if (_inner_error_ != NULL) {
9840 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9841 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
9842 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9843 g_propagate_error (error, _inner_error_);
9844 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9845 return;
9846 #line 9847 "tracker-sparql-query.c"
9847 } else {
9848 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9849 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9850 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9851 g_clear_error (&_inner_error_);
9852 #line 981 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9853 return;
9854 #line 9855 "tracker-sparql-query.c"
9855 }
9856 }
9857 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9858 _tmp5_ = self->priv->current_subject;
9859 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9860 if (_tmp5_ == NULL) {
9861 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9862 _tmp4_ = TRUE;
9863 #line 9864 "tracker-sparql-query.c"
9864 } else {
9865 const gchar* _tmp6_;
9866 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9867 _tmp6_ = self->priv->current_predicate;
9868 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9869 _tmp4_ = _tmp6_ == NULL;
9870 #line 9871 "tracker-sparql-query.c"
9871 }
9872 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9873 _tmp7_ = _tmp4_;
9874 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9875 if (_tmp7_) {
9876 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9877 _tmp3_ = TRUE;
9878 #line 9879 "tracker-sparql-query.c"
9879 } else {
9880 const gchar* _tmp8_;
9881 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9882 _tmp8_ = object;
9883 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9884 _tmp3_ = _tmp8_ == NULL;
9885 #line 9886 "tracker-sparql-query.c"
9886 }
9887 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9888 _tmp9_ = _tmp3_;
9889 #line 982 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9890 if (_tmp9_) {
9891 #line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9892 _g_free0 (object);
9893 #line 985 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9894 return;
9895 #line 9896 "tracker-sparql-query.c"
9896 }
9897 {
9898 gboolean _tmp10_;
9899 #line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9900 _tmp10_ = self->priv->update_statements;
9901 #line 988 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9902 if (_tmp10_) {
9903 #line 9904 "tracker-sparql-query.c"
9904 const gchar* _tmp11_ = NULL;
9905 gboolean _tmp12_;
9906 const gchar* _tmp14_;
9907 const gchar* _tmp15_;
9908 const gchar* _tmp16_;
9909 const gchar* _tmp17_;
9910 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9911 _tmp12_ = is_null;
9912 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9913 if (_tmp12_) {
9914 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9915 _tmp11_ = NULL;
9916 #line 9917 "tracker-sparql-query.c"
9917 } else {
9918 const gchar* _tmp13_;
9919 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9920 _tmp13_ = object;
9921 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9922 _tmp11_ = _tmp13_;
9923 #line 9924 "tracker-sparql-query.c"
9924 }
9925 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9926 _tmp14_ = self->priv->current_graph;
9927 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9928 _tmp15_ = self->priv->current_subject;
9929 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9930 _tmp16_ = self->priv->current_predicate;
9931 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9932 _tmp17_ = _tmp11_;
9933 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9934 tracker_data_update_statement (_tmp14_, _tmp15_, _tmp16_, _tmp17_, &_inner_error_);
9935 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9936 if (_inner_error_ != NULL) {
9937 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9938 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
9939 #line 9940 "tracker-sparql-query.c"
9940 goto __catch3_tracker_sparql_error;
9941 }
9942 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9943 if (_inner_error_->domain == TRACKER_DATE_ERROR) {
9944 #line 9945 "tracker-sparql-query.c"
9945 goto __catch3_tracker_date_error;
9946 }
9947 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9948 _g_free0 (object);
9949 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9950 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9951 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9952 g_clear_error (&_inner_error_);
9953 #line 990 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9954 return;
9955 #line 9956 "tracker-sparql-query.c"
9956 }
9957 } else {
9958 gboolean _tmp18_;
9959 #line 991 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9960 _tmp18_ = self->priv->delete_statements;
9961 #line 991 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9962 if (_tmp18_) {
9963 #line 9964 "tracker-sparql-query.c"
9964 gboolean _tmp19_;
9965 const gchar* _tmp21_;
9966 const gchar* _tmp22_;
9967 const gchar* _tmp23_;
9968 const gchar* _tmp24_;
9969 #line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9970 _tmp19_ = is_null;
9971 #line 993 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9972 if (_tmp19_) {
9973 #line 9974 "tracker-sparql-query.c"
9974 GError* _tmp20_ = NULL;
9975 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9976 _tmp20_ = tracker_sparql_query_get_error (self, "'null' not supported in this mode");
9977 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9978 _inner_error_ = _tmp20_;
9979 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9980 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
9981 #line 9982 "tracker-sparql-query.c"
9982 goto __catch3_tracker_sparql_error;
9983 }
9984 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9985 if (_inner_error_->domain == TRACKER_DATE_ERROR) {
9986 #line 9987 "tracker-sparql-query.c"
9987 goto __catch3_tracker_date_error;
9988 }
9989 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9990 _g_free0 (object);
9991 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9992 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
9993 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9994 g_clear_error (&_inner_error_);
9995 #line 994 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
9996 return;
9997 #line 9998 "tracker-sparql-query.c"
9998 }
9999 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10000 _tmp21_ = self->priv->current_graph;
10001 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10002 _tmp22_ = self->priv->current_subject;
10003 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10004 _tmp23_ = self->priv->current_predicate;
10005 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10006 _tmp24_ = object;
10007 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10008 tracker_data_delete_statement (_tmp21_, _tmp22_, _tmp23_, _tmp24_, &_inner_error_);
10009 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10010 if (_inner_error_ != NULL) {
10011 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10012 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
10013 #line 10014 "tracker-sparql-query.c"
10014 goto __catch3_tracker_sparql_error;
10015 }
10016 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10017 if (_inner_error_->domain == TRACKER_DATE_ERROR) {
10018 #line 10019 "tracker-sparql-query.c"
10019 goto __catch3_tracker_date_error;
10020 }
10021 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10022 _g_free0 (object);
10023 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10024 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
10025 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10026 g_clear_error (&_inner_error_);
10027 #line 996 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10028 return;
10029 #line 10030 "tracker-sparql-query.c"
10030 }
10031 } else {
10032 gboolean _tmp25_;
10033 const gchar* _tmp27_;
10034 const gchar* _tmp28_;
10035 const gchar* _tmp29_;
10036 const gchar* _tmp30_;
10037 #line 999 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10038 _tmp25_ = is_null;
10039 #line 999 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10040 if (_tmp25_) {
10041 #line 10042 "tracker-sparql-query.c"
10042 GError* _tmp26_ = NULL;
10043 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10044 _tmp26_ = tracker_sparql_query_get_error (self, "'null' not supported in this mode");
10045 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10046 _inner_error_ = _tmp26_;
10047 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10048 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
10049 #line 10050 "tracker-sparql-query.c"
10050 goto __catch3_tracker_sparql_error;
10051 }
10052 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10053 if (_inner_error_->domain == TRACKER_DATE_ERROR) {
10054 #line 10055 "tracker-sparql-query.c"
10055 goto __catch3_tracker_date_error;
10056 }
10057 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10058 _g_free0 (object);
10059 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10060 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
10061 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10062 g_clear_error (&_inner_error_);
10063 #line 1000 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10064 return;
10065 #line 10066 "tracker-sparql-query.c"
10066 }
10067 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10068 _tmp27_ = self->priv->current_graph;
10069 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10070 _tmp28_ = self->priv->current_subject;
10071 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10072 _tmp29_ = self->priv->current_predicate;
10073 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10074 _tmp30_ = object;
10075 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10076 tracker_data_insert_statement (_tmp27_, _tmp28_, _tmp29_, _tmp30_, &_inner_error_);
10077 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10078 if (_inner_error_ != NULL) {
10079 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10080 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) {
10081 #line 10082 "tracker-sparql-query.c"
10082 goto __catch3_tracker_sparql_error;
10083 }
10084 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10085 if (_inner_error_->domain == TRACKER_DATE_ERROR) {
10086 #line 10087 "tracker-sparql-query.c"
10087 goto __catch3_tracker_date_error;
10088 }
10089 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10090 _g_free0 (object);
10091 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10092 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
10093 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10094 g_clear_error (&_inner_error_);
10095 #line 1002 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10096 return;
10097 #line 10098 "tracker-sparql-query.c"
10098 }
10099 }
10100 }
10101 }
10102 goto __finally3;
10103 __catch3_tracker_sparql_error:
10104 {
10105 GError* e = NULL;
10106 gboolean _tmp31_;
10107 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10108 e = _inner_error_;
10109 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10110 _inner_error_ = NULL;
10111 #line 1005 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10112 _tmp31_ = self->priv->silent;
10113 #line 1005 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10114 if (!_tmp31_) {
10115 #line 10116 "tracker-sparql-query.c"
10116 GError* _tmp32_;
10117 GError* _tmp33_;
10118 #line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10119 _tmp32_ = e;
10120 #line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10121 _tmp33_ = _g_error_copy0 (_tmp32_);
10122 #line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10123 _inner_error_ = _tmp33_;
10124 #line 1006 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10125 _g_error_free0 (e);
10126 #line 10127 "tracker-sparql-query.c"
10127 goto __finally3;
10128 }
10129 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10130 _g_error_free0 (e);
10131 #line 10132 "tracker-sparql-query.c"
10132 }
10133 goto __finally3;
10134 __catch3_tracker_date_error:
10135 {
10136 GError* e = NULL;
10137 gboolean _tmp34_;
10138 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10139 e = _inner_error_;
10140 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10141 _inner_error_ = NULL;
10142 #line 1009 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10143 _tmp34_ = self->priv->silent;
10144 #line 1009 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10145 if (!_tmp34_) {
10146 #line 10147 "tracker-sparql-query.c"
10147 GError* _tmp35_;
10148 const gchar* _tmp36_;
10149 GError* _tmp37_;
10150 #line 1010 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10151 _tmp35_ = e;
10152 #line 1010 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10153 _tmp36_ = _tmp35_->message;
10154 #line 1010 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10155 _tmp37_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_TYPE, _tmp36_);
10156 #line 1010 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10157 _inner_error_ = _tmp37_;
10158 #line 1010 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10159 _g_error_free0 (e);
10160 #line 10161 "tracker-sparql-query.c"
10161 goto __finally3;
10162 }
10163 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10164 _g_error_free0 (e);
10165 #line 10166 "tracker-sparql-query.c"
10166 }
10167 __finally3:
10168 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10169 if (_inner_error_ != NULL) {
10170 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10171 if ((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == TRACKER_DATE_ERROR)) {
10172 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10173 g_propagate_error (error, _inner_error_);
10174 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10175 _g_free0 (object);
10176 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10177 return;
10178 #line 10179 "tracker-sparql-query.c"
10179 } else {
10180 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10181 _g_free0 (object);
10182 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10183 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
10184 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10185 g_clear_error (&_inner_error_);
10186 #line 987 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10187 return;
10188 #line 10189 "tracker-sparql-query.c"
10189 }
10190 }
10191 #line 979 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10192 _g_free0 (object);
10193 #line 10194 "tracker-sparql-query.c"
10194 }
10195
10196
10197 gboolean tracker_sparql_query_get_no_cache (TrackerSparqlQuery* self) {
10198 gboolean result;
10199 gboolean _tmp0_;
10200 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10201 g_return_val_if_fail (self != NULL, FALSE);
10202 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10203 _tmp0_ = self->priv->_no_cache;
10204 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10205 result = _tmp0_;
10206 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10207 return result;
10208 #line 10209 "tracker-sparql-query.c"
10209 }
10210
10211
10212 void tracker_sparql_query_set_no_cache (TrackerSparqlQuery* self, gboolean value) {
10213 gboolean _tmp0_;
10214 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10215 g_return_if_fail (self != NULL);
10216 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10217 _tmp0_ = value;
10218 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10219 self->priv->_no_cache = _tmp0_;
10220 #line 244 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10221 g_object_notify ((GObject *) self, "no-cache");
10222 #line 10223 "tracker-sparql-query.c"
10223 }
10224
10225
10226 static TrackerSparqlQueryTokenInfo* tracker_sparql_query_token_info_dup (const TrackerSparqlQueryTokenInfo* self) {
10227 TrackerSparqlQueryTokenInfo* dup;
10228 #line 203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10229 dup = g_new0 (TrackerSparqlQueryTokenInfo, 1);
10230 #line 203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10231 memcpy (dup, self, sizeof (TrackerSparqlQueryTokenInfo));
10232 #line 203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10233 return dup;
10234 #line 10235 "tracker-sparql-query.c"
10235 }
10236
10237
10238 static void tracker_sparql_query_token_info_free (TrackerSparqlQueryTokenInfo* self) {
10239 #line 203 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10240 g_free (self);
10241 #line 10242 "tracker-sparql-query.c"
10242 }
10243
10244
10245 static GType tracker_sparql_query_token_info_get_type (void) {
10246 static volatile gsize tracker_sparql_query_token_info_type_id__volatile = 0;
10247 if (g_once_init_enter (&tracker_sparql_query_token_info_type_id__volatile)) {
10248 GType tracker_sparql_query_token_info_type_id;
10249 tracker_sparql_query_token_info_type_id = g_boxed_type_register_static ("TrackerSparqlQueryTokenInfo", (GBoxedCopyFunc) tracker_sparql_query_token_info_dup, (GBoxedFreeFunc) tracker_sparql_query_token_info_free);
10250 g_once_init_leave (&tracker_sparql_query_token_info_type_id__volatile, tracker_sparql_query_token_info_type_id);
10251 }
10252 return tracker_sparql_query_token_info_type_id__volatile;
10253 }
10254
10255
10256 static void tracker_sparql_query_class_init (TrackerSparqlQueryClass * klass) {
10257 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10258 tracker_sparql_query_parent_class = g_type_class_peek_parent (klass);
10259 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10260 g_type_class_add_private (klass, sizeof (TrackerSparqlQueryPrivate));
10261 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10262 G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_query_get_property;
10263 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10264 G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_query_set_property;
10265 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10266 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_query_finalize;
10267 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10268 g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_QUERY_NO_CACHE, g_param_spec_boolean ("no-cache", "no-cache", "no-cache", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
10269 #line 10270 "tracker-sparql-query.c"
10270 }
10271
10272
10273 static void tracker_sparql_query_instance_init (TrackerSparqlQuery * self) {
10274 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10275 self->priv = TRACKER_SPARQL_QUERY_GET_PRIVATE (self);
10276 #line 236 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10277 self->priv->bnodeid = 0;
10278 #line 843 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10279 self->priv->anon_blank_node_open = FALSE;
10280 #line 10281 "tracker-sparql-query.c"
10281 }
10282
10283
10284 static void tracker_sparql_query_finalize (GObject* obj) {
10285 TrackerSparqlQuery * self;
10286 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10287 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQuery);
10288 #line 192 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10289 _g_object_unref0 (self->priv->scanner);
10290 #line 195 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10291 self->priv->tokens = (g_free (self->priv->tokens), NULL);
10292 #line 211 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10293 _g_free0 (self->priv->query_string);
10294 #line 214 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10295 _g_object_unref0 (self->expression);
10296 #line 215 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10297 _g_object_unref0 (self->pattern);
10298 #line 217 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10299 _g_free0 (self->priv->current_graph);
10300 #line 218 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10301 _g_free0 (self->priv->current_subject);
10302 #line 220 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10303 _g_free0 (self->priv->current_predicate);
10304 #line 226 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10305 _g_hash_table_unref0 (self->priv->prefix_map);
10306 #line 229 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10307 __g_list_free__g_object_unref0_0 (self->bindings);
10308 #line 231 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10309 _tracker_sparql_context_unref0 (self->context);
10310 #line 238 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10311 self->priv->base_uuid = (g_free (self->priv->base_uuid), NULL);
10312 #line 239 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10313 _g_hash_table_unref0 (self->priv->blank_nodes);
10314 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10315 G_OBJECT_CLASS (tracker_sparql_query_parent_class)->finalize (obj);
10316 #line 10317 "tracker-sparql-query.c"
10317 }
10318
10319
10320 GType tracker_sparql_query_get_type (void) {
10321 static volatile gsize tracker_sparql_query_type_id__volatile = 0;
10322 if (g_once_init_enter (&tracker_sparql_query_type_id__volatile)) {
10323 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlQueryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_query_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlQuery), 0, (GInstanceInitFunc) tracker_sparql_query_instance_init, NULL };
10324 GType tracker_sparql_query_type_id;
10325 tracker_sparql_query_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlQuery", &g_define_type_info, 0);
10326 g_once_init_leave (&tracker_sparql_query_type_id__volatile, tracker_sparql_query_type_id);
10327 }
10328 return tracker_sparql_query_type_id__volatile;
10329 }
10330
10331
10332 static void _vala_tracker_sparql_query_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
10333 TrackerSparqlQuery * self;
10334 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQuery);
10335 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10336 switch (property_id) {
10337 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10338 case TRACKER_SPARQL_QUERY_NO_CACHE:
10339 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10340 g_value_set_boolean (value, tracker_sparql_query_get_no_cache (self));
10341 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10342 break;
10343 #line 10344 "tracker-sparql-query.c"
10344 default:
10345 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10346 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
10347 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10348 break;
10349 #line 10350 "tracker-sparql-query.c"
10350 }
10351 }
10352
10353
10354 static void _vala_tracker_sparql_query_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
10355 TrackerSparqlQuery * self;
10356 self = G_TYPE_CHECK_INSTANCE_CAST (object, TRACKER_SPARQL_TYPE_QUERY, TrackerSparqlQuery);
10357 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10358 switch (property_id) {
10359 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10360 case TRACKER_SPARQL_QUERY_NO_CACHE:
10361 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10362 tracker_sparql_query_set_no_cache (self, g_value_get_boolean (value));
10363 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10364 break;
10365 #line 10366 "tracker-sparql-query.c"
10366 default:
10367 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10368 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
10369 #line 191 "/home/martyn/Source/tracker/src/libtracker-data/tracker-sparql-query.vala"
10370 break;
10371 #line 10372 "tracker-sparql-query.c"
10372 }
10373 }
10374
10375
10376 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
10377 if ((array != NULL) && (destroy_func != NULL)) {
10378 int i;
10379 for (i = 0; i < array_length; i = i + 1) {
10380 if (((gpointer*) array)[i] != NULL) {
10381 destroy_func (((gpointer*) array)[i]);
10382 }
10383 }
10384 }
10385 }
10386
10387
10388 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
10389 _vala_array_destroy (array, array_length, destroy_func);
10390 g_free (array);
10391 }