summaryrefslogtreecommitdiffstats
path: root/slv2/query.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-03 05:11:57 +0000
committerDavid Robillard <d@drobilla.net>2006-09-03 05:11:57 +0000
commit056f394151a48e9d129691fd7451a3d0bcbde3ba (patch)
treec7c95bccfc503e704003e33b9385aa4657d2a57a /slv2/query.h
parent6c8dc477bda2d6e67893f4475e603a11cf507017 (diff)
downloadlilv-056f394151a48e9d129691fd7451a3d0bcbde3ba.tar.gz
lilv-056f394151a48e9d129691fd7451a3d0bcbde3ba.tar.bz2
lilv-056f394151a48e9d129691fd7451a3d0bcbde3ba.zip
Saner (internal) query API, though still needs work.
Preliminary (untested) support for host features/extensions/whatever. Documentation fixes and minor cleanups. git-svn-id: http://svn.drobilla.net/lad/libslv2@113 a436a847-0d15-0410-975c-d299462d15a1
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