Liking cljdoc? Tell your friends :D

space.matterandvoid.subscriptions.impl.subs


args->inputs-fnclj/s

(args->inputs-fn get-input-db-signal subscribe err-header args)
source

args-merge-fnclj/s

source

cache-and-return!clj/s

(cache-and-return! get-subscription-cache
                   get-cache-key
                   app
                   query-v
                   reaction-or-cursor)

cache the reaction reaction-or-cursor

cache the reaction reaction-or-cursor
sourceraw docstring

clear-subscription-cache!clj/s

(clear-subscription-cache! get-subscription-cache app)

calls on-dispose for each cached item, which will cause the value to be removed from the cache

calls `on-dispose` for each cached item,
which will cause the value to be removed from the cache
sourceraw docstring

deflayer2-subclj/smacro

(deflayer2-sub meta-sub-kw get-input-db-signal def-sub-name ?path)

Only supports use cases where your datasource is a hashmap.

Takes a symbol for a subscription name and a way to derive a path in your datasource hashmap. Returns a function subscription which itself returns a Reagent RCursor. Supports a vector path, a single keyword, or a function which takes the RAtom datasource and the arguments map passed to subscribe and must return a path vector to use as an RCursor path.

Examples:

(deflayer2-sub my-subscription :a-path-in-your-db)

(deflayer2-sub my-subscription [:a-path-in-your-db])

(deflayer2-sub my-subscription (fn [db-atom sub-args-map] [:a-key (:some-val sub-args-map])))

Only supports use cases where your datasource is a hashmap.

Takes a symbol for a subscription name and a way to derive a path in your datasource hashmap. Returns a function subscription
which itself returns a Reagent RCursor.
Supports a vector path, a single keyword, or a function which takes the RAtom datasource and the arguments map passed to subscribe and
must return a path vector to use as an RCursor path.

Examples:

(deflayer2-sub my-subscription :a-path-in-your-db)

(deflayer2-sub my-subscription [:a-path-in-your-db])

(deflayer2-sub my-subscription (fn [db-atom sub-args-map] [:a-key (:some-val sub-args-map])))
sourceraw docstring

defsubrawclj/smacro

(defsubraw meta-sub-kw get-input-db-signal sub-name args body)

Creates a subscription function that takes the datasource ratom and optionally an args map and returns a Reaction or RCursor type.

Creates a subscription function that takes the datasource ratom and optionally an args map and returns a Reaction
or RCursor type.
sourceraw docstring

deref-input-signalsclj/s

(deref-input-signals signals query-id)
source

lenient-callclj/smacro

(lenient-call f datasource args)

Deal with arity stricness on JVM

Deal with arity stricness on JVM
sourceraw docstring

make-layer2-sub-fnclj/s

(make-layer2-sub-fn get-input-db-signal meta-sub-kw sub-name path)
source

make-layer2-sub-fn*clj/s

(make-layer2-sub-fn* get-input-db-signal sub-name path)
source

make-raw-subclj/s

(make-raw-sub get-input-db-signal meta-sub-kw full-name sub-f)
source

make-sub-fnclj/s

(make-sub-fn get-input-db-signal meta-sub-kw subscribe query-id sub-args)
source

make-subs-handler-fnclj/s

(make-subs-handler-fn inputs-fn computation-fn query-id)

A subscription is just a function that returns a reagent.Reaction.

This is where the inputs-fn is executed and the computation is put inside a reaction - ie a callback for later invocation when subscribe is called and derefed.

A subscription is just a function that returns a reagent.Reaction.

This is where the inputs-fn is executed and the computation is put inside a reaction - ie a callback for later
invocation when subscribe is called and derefed.
sourceraw docstring

map-signalsclj/s

(map-signals f signals)

Runs f over signals. Signals may take several forms, this function handles all of them.

Runs f over signals. Signals may take several
forms, this function handles all of them.
sourceraw docstring

map-valsclj/s

(map-vals f m)

Returns a new version of 'm' in which 'f' has been applied to each value. (map-vals inc {:a 4, :b 2}) => {:a 5, :b 3}

Returns a new version of 'm' in which 'f' has been applied to each value.
(map-vals inc {:a 4, :b 2}) => {:a 5, :b 3}
sourceraw docstring

memoize-fnclj/s

source

merge-update-argsclj/s

(merge-update-args subs-vec args*)
source

parse-reg-sub-argsclj/s

(parse-reg-sub-args get-input-db-signal subscribe err-header args)
source

reg-layer2-subclj/s

(reg-layer2-sub get-input-db-signal register-handler! query-id path-vec-or-fn)

Registers a handler function that returns a Reagent RCursor instead of a Reagent Reaction. Accepts a single keyword, a vector path into or a function which takes your db atom and arguments map passed to subscribe and must return a vector path to be used for the cursor.

Registers a handler function that returns a Reagent RCursor instead of a Reagent Reaction.
Accepts a single keyword, a vector path into or a function which takes your db atom and arguments map passed to subscribe
and must return a vector path to be used for the cursor.
sourceraw docstring

reg-subclj/s

(reg-sub get-input-db-signal
         get-handler
         register-handler!
         get-subscription-cache
         cache-lookup
         get-cache-key
         query-id
         &
         args)

db, fully qualified keyword for the query id optional positional args.

db, fully qualified keyword for the query id
optional positional args.
sourceraw docstring

reg-sub-rawclj/s

(reg-sub-raw register-handler! query-id handler-fn)
source

set-args-merge-fn!clj/s

(set-args-merge-fn! f)
source

set-memoize-fn!clj/s

(set-memoize-fn! f)
source

sub-fnclj/s

(sub-fn meta-sub-kw f)

Takes a function that returns either a Reaction or RCursor. Returns a function that when invoked delegates to f and derefs its output. The returned function can be used in subscriptions.

Takes a function that returns either a Reaction or RCursor. Returns a function that when invoked delegates to `f` and
derefs its output. The returned function can be used in subscriptions.
sourceraw docstring

subscribeclj/s

(subscribe get-handler
           cache-lookup
           get-subscription-cache
           get-cache-key
           datasource
           query)

Takes a datasource and query and returns a Reaction.

Takes a datasource and query and returns a Reaction.
sourceraw docstring

valid-signalsclj/s

source

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

× close