(cas-multi-or-report conn ensures)
(cas-multi-or-report conn ensures updates)
this is basically our cas-multi but with a twist it reports which keys failed compare to oldval Returns:
(cas-multi-or-report
conn
[:kte1 oldval1
:kte2 oldval2
:kte3 oldval3] ;; keys to ensure
[:ktu1 oldval1 newval1
:ktu2 oldval2 newval2
:ktu3 oldval3 newval3] ;; keys to update
:timeout 10) ;; timeout in seconds (not implemented yet)
TODO: figure out a way to fail a transaction that takes too long TODO(ocd): optimize let difinitions
this is basically our cas-multi but with a twist it reports which keys failed compare to oldval Returns: - true when everything went fine - false if soemthing went wrong in watch/multi/exec - an array of ref keys that failed compare to oldvals // TODO: ^^ maybe make the api a bit friendlier? Usage: ``` (cas-multi-or-report conn [:kte1 oldval1 :kte2 oldval2 :kte3 oldval3] ;; keys to ensure [:ktu1 oldval1 newval1 :ktu2 oldval2 newval2 :ktu3 oldval3 newval3] ;; keys to update :timeout 10) ;; timeout in seconds (not implemented yet) ``` TODO: figure out a way to fail a transaction that takes too long TODO(ocd): optimize let difinitions
(conflicts conn ks oldvals)
Returns a list of keys that failed compare to oldvals
Returns a list of keys that failed compare to oldvals
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close