Skip to content

Instantly share code, notes, and snippets.

@AlBaker
Created April 7, 2014 19:58
Show Gist options
  • Save AlBaker/10041003 to your computer and use it in GitHub Desktop.
Save AlBaker/10041003 to your computer and use it in GitHub Desktop.
myapp.core=> (use 'stardog.core)
nil
myapp.core=> (def db-spec (create-db-spec "testdb" "snarl://localhost:5820/" "admin" "admin" "none"))
#'myapp.core/db-spec
myapp.core=> (def ds (make-datasource db-spec))
myapp.core=> (with-connection-pool [conn ds]
#_=> (query conn "SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 2"))
({:s #<URI urn:test1>, :p #<URI urn:test:predicate>, :o "hello world"} {:s #<URI urn:test1>, :p #<URI urn:test:predicate>, :o "hello world2"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment