Skip to content

Instantly share code, notes, and snippets.

@mhgrove
Last active February 11, 2016 14:27
Show Gist options
  • Save mhgrove/2952a69d54397b46f17e to your computer and use it in GitHub Desktop.
Save mhgrove/2952a69d54397b46f17e to your computer and use it in GitHub Desktop.
query example
mhgrove:dist mhgrove$ ./bin/stardog-admin db create -n foo
Successfully created database 'foo'.
mhgrove:dist mhgrove$ ./bin/stardog query foo "insert data { graph <tag:stardog:api:context:equipment> { <urn:a> <urn:b> <urn:c> } . graph <tag:stardog:api:context:phase-of-development> { <urn:d> <urn:e> <urn:f> } }"
Update query processed successfully in 00:00:00.147.
mhgrove:dist mhgrove$ ./bin/stardog data export foo --format NQUADS
<urn:a> <urn:b> <urn:c> <tag:stardog:api:context:equipment> .
<urn:d> <urn:e> <urn:f> <tag:stardog:api:context:phase-of-development> .
mhgrove:dist mhgrove$ ./bin/stardog query foo "SELECT ?s ?p ?o
> WHERE {
> GRAPH <tag:stardog:api:context:phase-of-development>
> {
> ?s ?p ?o .
> }
> }
> LIMIT 100"
+-------+-------+-------+
| s | p | o |
+-------+-------+-------+
| urn:d | urn:e | urn:f |
+-------+-------+-------+
Query returned 1 results in 00:00:00.066
mhgrove:dist mhgrove$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment