summaryrefslogtreecommitdiffstats
path: root/slv2/query.h
diff options
context:
space:
mode:
Diffstat (limited to 'slv2/query.h')
-rw-r--r--slv2/query.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/slv2/query.h b/slv2/query.h
index 9f1c93d..a23df0e 100644
--- a/slv2/query.h
+++ b/slv2/query.h
@@ -74,23 +74,32 @@ char*
slv2_query_lang_filter(const char* variable);
-/** Run a SPARQL query on a plugin's data file.
+/** Run a SPARQL query on a plugin's data file and return variable matches.
*
* Header from slv2query_header will be prepended to passed query string (so
* the default prefixes will be already defined, you don't need to add them
* yourself).
*
- * rasqal_init() must be called by the caller before calling this function.
+ * Returned is a list of all matches for the query variable \a var_name.
*/
-rasqal_query_results*
-slv2_plugin_run_query(const SLV2Plugin* p,
- const char* query_string);
+SLV2Property
+slv2_query_get_results(const SLV2Plugin* p,
+ const char* query_string,
+ const char* var_name);
+
+/** Run a SPARQL query on a plugin's data file and just count the matches.
+ *
+ * Header from slv2query_header will be prepended to passed query string (so
+ * the default prefixes will be already defined, you don't need to add them
+ * yourself).
+ *
+ * Returned is the total of all variable matches resulting from the query.
+ */
size_t
-slv2_query_get_num_results(rasqal_query_results* results, const char* var_name);
+slv2_query_count_results(const SLV2Plugin* p,
+ const char* query_string);
-SLV2Property
-slv2_query_get_results(rasqal_query_results* results, const char* var_name);
/** Free an SLV2Property. */
void