Created
April 21, 2014 02:26
-
-
Save AlBaker/11130645 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; First, add a triple | |
;; Then run an udpate query, which is its own transaction | |
;; Finally, confirm via ask | |
(with-open [c (connect test-db-spec)] | |
(with-transaction [c] | |
(insert! c ["urn:testUpdate:a1" "urn:testUpdate:b" "aloha world"])) | |
(update c "DELETE { ?a ?b \"aloha world\" } INSERT { ?a ?b \"shalom world\" } WHERE { ?a ?b \"aloha world\" }" | |
{:parameters {"?a" "urn:testUpdate:a1" "?b" "urn:testUpdate:b"}}) | |
(ask c "ask { ?s ?p \"shalom world\" }") => truthy) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment