Liking cljdoc? Tell your friends :D

molecula.redis


cas-multi-or-reportclj

(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:

  • 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

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
sourceraw docstring

conflictsclj

(conflicts conn ks oldvals)

Returns a list of keys that failed compare to oldvals

Returns a list of keys that failed compare to oldvals
sourceraw docstring

deref*clj

(deref* conn k)
source

deref-multiclj

(deref-multi conn ks)
source

mcas-or-reportclj

(mcas-or-report conn ensures updates & {:keys [timeout-ms]})
source

multi-execcljmacro

(multi-exec conn & forms)
source

set-multi!clj

(set-multi! conn kvs)
(set-multi! conn ks vs)
source

setnx*clj

(setnx* conn k newval)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close