summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 8441aec..abb577b 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -172,6 +172,26 @@ slv2_plugin_get_value(SLV2Plugin p,
return result;
}
+
+SLV2Strings
+slv2_plugin_get_value_for_subject(SLV2Plugin p,
+ const char* subject,
+ const char* predicate)
+{
+ assert(predicate);
+
+ char* query = slv2_strjoin(
+ "SELECT DISTINCT ?value WHERE {\n",
+ subject, " ", predicate, " ?value .\n"
+ "}\n", NULL);
+
+ SLV2Strings result = slv2_plugin_simple_query(p, query, "value");
+
+ free(query);
+
+ return result;
+}
+
SLV2Strings
slv2_plugin_get_properties(SLV2Plugin p)