Description Usage Arguments Value Examples
View source: R/db-access-high-level.R
The function ‘query_factory'’s purpose is to manufacture a function executing a specified SPARQL query against a specified endpoint.
1 2 | query_factory(p_query, submit_function = submit_sparql, access_options,
prefixes = NA, ...)
|
p_query |
character. A parameterized SPARQL query. Parameters are given with percent sign in front |
submit_function |
function. The function that should be used to submit the
query - i.e. whether to use the READ endpoint or the UPDATE endpoint.
One of |
access_options |
triplestore_access_options. |
prefix |
named character |
the query function (closure)
1 2 3 4 5 6 7 8 9 10 11 12 13 | p_query = "SELECT DISTINCT ?id WHERE {
?id rdfs:label '%label'
}"
p_query2 = "SELECT * WHERE {
?s ?p ?o
} LIMIT 100"
drop_query = "DROP GRAPH %subgraph"
simple_lookup = query_factory(p_query, access_options = graphdb)
simplest_f = query_factory(p_query2, access_options = graphdb)
drop_g = query_factory(drop_query, submit_function = submit_sparql_update, access_options = graphdb_secret)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.