summaryrefslogtreecommitdiffstats
path: root/src/query.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-23 20:20:07 +0000
committerDavid Robillard <d@drobilla.net>2008-01-23 20:20:07 +0000
commit3ed6969828fd56257c7cfcbc335f4e4e428a3faa (patch)
tree702976465e390cdc0156029d9dc42427f2ce9860 /src/query.c
parent685963ae9bb4435f794de578d14a2cb47c24ee15 (diff)
downloadlilv-3ed6969828fd56257c7cfcbc335f4e4e428a3faa.tar.gz
lilv-3ed6969828fd56257c7cfcbc335f4e4e428a3faa.tar.bz2
lilv-3ed6969828fd56257c7cfcbc335f4e4e428a3faa.zip
Trim useless cruft.
Disable unused parameter warning with --enable-strict. git-svn-id: http://svn.drobilla.net/lad/slv2@1106 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/query.c')
-rw-r--r--src/query.c48
1 files changed, 3 insertions, 45 deletions
diff --git a/src/query.c b/src/query.c
index fc3b132..54dcda4 100644
--- a/src/query.c
+++ b/src/query.c
@@ -36,23 +36,6 @@ static const char* slv2_query_prefixes =
"PREFIX lv2: <http://lv2plug.in/ns/lv2core#>\n"
"PREFIX lv2ev: <http://lv2plug.in/ns/ext/event#>\n";
-#if 0
-char*
-slv2_query_lang_filter(const char* variable)
-{
- char* result = NULL;
- char* const lang = (char*)getenv("LANG");
- if (lang) {
- // FILTER( LANG(?value) = "en" || LANG(?value) = "" )
- result = slv2_strjoin(
- //"FILTER (lang(?value) = \"", lang, "\"\n"), 0);
- "FILTER( lang(?", variable, ") = \"", lang,
- "\" || lang(?", variable, ") = \"\" )\n", NULL);
- }
-
- return result;
-}
-#endif
SLV2Values
slv2_query_get_variable_bindings(SLV2World world,
@@ -186,6 +169,9 @@ slv2_plugin_simple_query(SLV2Plugin plugin,
*
* More efficient than slv2_plugin_simple_query if you're only interested
* in the number of results (ie slv2_plugin_num_ports).
+ *
+ * Note the result of this function is probably meaningless unless the query
+ * is a SELECT DISTINCT.
*/
unsigned
slv2_plugin_query_count(SLV2Plugin plugin,
@@ -203,31 +189,3 @@ slv2_plugin_query_count(SLV2Plugin plugin,
return ret;
}
-/*
-size_t
-slv2_query_count_results(SLV2Plugin p,
- const char* query)
-{
- char* query_str = slv2_strjoin(slv2_query_prefixes, query, NULL);
-
- assert(p);
- assert(query_str);
-
- librdf_query *rq = librdf_new_query(p->world->world, "sparql", NULL,
- (unsigned char*)query_str, NULL);
-
- //printf("Query: \n%s\n\n", query_str);
-
- librdf_query_results* results = librdf_query_execute(rq, p->world->model);
- assert(results);
-
- size_t count = slv2_query_count_bindings(results);
-
- librdf_free_query_results(results);
- librdf_free_query(rq);
-
- free(query_str);
-
- return count;
-}
-*/