multiqueries in neo4j

integration-tests
Josha von Gizycki 6 years ago
parent a8a366f3d2
commit b88de50eb5

@ -37,6 +37,17 @@
params)) params))
(qry session params))) (qry session params)))
(defn exec-queries! [& tuples]
(with-open [session (db/get-session @conn)]
(doseq [tuple tuples]
(let [qry (first tuple)
params (second tuple)]
(devmode/send-to-bar
(str (butiful-query qry)
"<br>---Params---<br>"
params))
(qry session params)))))
(defn now-str [] (defn now-str []
(time-format/unparse (time-format/unparse
(time-format/formatters :basic-date-time) (time-format/formatters :basic-date-time)

@ -155,12 +155,11 @@
CREATE (s)<-[:permission{type:{permtype}}]-(u)") CREATE (s)<-[:permission{type:{permtype}}]-(u)")
(defn assign-users! [uuid users permission] (defn assign-users! [uuid users permission]
(neo4j/exec-query! (neo4j/exec-queries!
remove-assignments [remove-assignments
{:uuid uuid {:uuid uuid
:permtype permission}) :permtype permission}]
(neo4j/exec-query! [create-assignments
create-assignments {:uuid uuid
{:uuid uuid :users users
:users users :permtype permission}]))
:permtype permission}))

Loading…
Cancel
Save