Skip to content

Instantly share code, notes, and snippets.

@AlBaker
Created April 7, 2014 19:47
Show Gist options
  • Save AlBaker/10039066 to your computer and use it in GitHub Desktop.
Save AlBaker/10039066 to your computer and use it in GitHub Desktop.
=> (use 'stardog.core)
=> (def c (connect {:db "testdb" :url "snarl://localhost"}))
=> (def results (query c "select ?n { .... }"))
=> (take 5 results)
({:n #<StardogURI http://example.org/math#2>} {:n #<StardogURI http://example.org/math#3>} {:n #<StardogURI http://example.org/math#5>} {:n #<StardogURI http://example.org/math#7>} {:n #<StardogURI http://example.org/math#11>})
=> (def string-results (query c "select ?n { .... }" {:converter str}))
=> (take 5 string-results)
({:n "http://example.org/math#2"} {:n "http://example.org/math#3"} {:n "http://example.org/math#5"} {:n "http://example.org/math#7"} {:n "http://example.org/math#11"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment