Profile

4S-QUERY

4S-QUERY

BSD mandoc
4store

NAME

4s-query - Run SPARQL queries on a 4store storage backend

SYNOPSIS

kb-name [-f format ] [-O optimisation-level ] [-I insert-mode ] [-r ] [-s soft-limit ] [-b base-URI ] [-e ] [-P ] [query]

-f
Set the format to output results it, options are "sparql", "text", "json", and "testcase"
-O, --opt-level
Set the optimisation level of the query engine, in the range 0-3.
-I, --insert
Treat CONSTRUCT statements as INSERT statements. This feature is highly experimental and largly untested.
-r, --restricted
Enable query complexity restriction mode
-s, --soft-limit
Override default soft limit on search breadth
-d, --default-graph
Enable SPARQL default graph support
-b, --base
Set base URI for queries
-e, --explain
Return an explanation of the query planner's descisions
-P
Enable programatic IO mode

INTERACTIVE MODE

If [query] is ommited then goes into interactive mode, suitable for trying queries from the command line.

-P enables programatic interactive mode, suitable for infacing with processes via stdin and stdout. Queries are sent as UTF-8 bytes, terminated with "#EOQ" on a line of it's own, results are returned, ending with "#EOR". Interacting with 4store in this way is more efficient than using the SPARQL protocol, but non-standard.

SEE ALSO

4s-import1, 4s-httpd1, 4s-backend1, 4s-delete-model1

STANDARDS

implements the SPARQL Query Language specification (aka. SPARQL/Query 1.0) and the SPARQL Result Format specification (aka. SPARQL/Results 1.0).

Default graph support is no normally enabled, the --default-graph turns it on, as does speicfying FROM <default:> in the query. Data loaded with

$ 4s-import kb --add -m default: uri/filename

will be added to the default graph.

EXAMPLES

$ -f sparql demo 'SELECT * WHERE { ?s ?p ?s } LIMIT 10'

Return 10 random triples from the knowledgebase "demo" in the SPARQL XML result format.

$ -P demo < query.rq

Run the query in query.rq and output the result to stdout

Latest Tech News
Your Notes

Sign in/Sign up

Signing in to our system allows you to post your contributions and vote on the contributions of others. It will also allow you to get extra perts like having your favorites in the cloud and having your persistent personal notes wherever you go. More will be added as we scale up our services.

By signing in to our system, you agree our Member Terms and Conditions


Sign-in with one of the following services

Almost finished!

Please select a screen name for NET SOUP.



 Please send me news and special offers from NET SOUP.

 I have read and accept the Terms of Use.

COMPLIMENTARY EXAMPLES

We have no example yet for this entry


Your Name
Now

Community Contributions and Discussions

Modify your search

View Documentation

Jobs from Indeed