Liking cljdoc? Tell your friends :D

naga.engine

Functions to run rules until completion.

Functions to run rules until completion.
raw docstring

executeclj/s

(execute rules db-store)

Inputs: [rules :- #:s{Str DynamicRule} db-store :- StorageType] Returns: [(s/one StorageType "Final value of storage") (s/one #:s{Str s/Num} "Map of rule name to execution count")]

Executes a program. Data is retrieved from and inserted into db-store.

Inputs: [rules :- #:s{Str DynamicRule} db-store :- StorageType]
Returns: [(s/one StorageType "Final value of storage") (s/one #:s{Str s/Num} "Map of rule name to execution count")]

Executes a program. Data is retrieved from and inserted into db-store.
raw docstring

extract-dirty-patternclj/s

(extract-dirty-pattern [p status-atom])

Inputs: [[p status-atom] :- StatusMapEntry] Returns: (s/maybe ss/EPVPattern)

Takes a key and value pair (from a status map) and determines if the value (a ConstraintData) is marked dirty. If it is dirty, then return the key (an EPVPattern).

Inputs: [[p status-atom] :- StatusMapEntry]
Returns: (s/maybe ss/EPVPattern)

Takes a key and value pair (from a status map) and determines if
the value (a ConstraintData) is marked dirty.  If it is dirty, then return
the key (an EPVPattern).
raw docstring

initialize-rulesclj/s

(initialize-rules rules)

Inputs: [rules :- #:s{Str Rule}] Returns: #:s{Str DynamicRule}

Takes rules with calculated dependencies, and initializes them

Inputs: [rules :- #:s{Str Rule}]
Returns: #:s{Str DynamicRule}

Takes rules with calculated dependencies, and initializes them
raw docstring

mark-rule-cleaned-with-latest-count!clj/s

(mark-rule-cleaned-with-latest-count! dirty-patterns counted-set status)

Inputs: [dirty-patterns :- [ss/EPVPattern] counted-set :- #:ss{EPVPattern ss/EPVPattern} status :- StatusMap]

Reset the pattern status, making it clean. Uses meta from resolve-count (above). Result should be ignored.

Inputs: [dirty-patterns :- [ss/EPVPattern] counted-set :- #:ss{EPVPattern ss/EPVPattern} status :- StatusMap]

Reset the pattern status, making it clean.  Uses meta from
 resolve-count (above). Result should be ignored.
raw docstring

resolve-countclj/s

(resolve-count storage status p)

Inputs: [storage :- StorageType status :- StatusMap p :- ss/EPVPattern] Returns: (s/maybe ss/EPVPattern)

Resolve a pattern against storage, and set the :resolution meta data if the result is different from the last resolution. Requires a status map in order to lookup the last-count.

Inputs: [storage :- StorageType status :- StatusMap p :- ss/EPVPattern]
Returns: (s/maybe ss/EPVPattern)

Resolve a pattern against storage, and set the :resolution meta
data if the result is different from the last resolution.  Requires
a status map in order to lookup the last-count.
raw docstring

runclj/s

(run config {:keys [rules axioms]})

Inputs: [config {:keys [rules axioms]} :- Program] Returns: [(s/one StorageType "Resulting data store") (s/one #:s{Str s/Num} "Execution stats") (s/one (s/maybe [s/Any]) "Delta IDs")]

Runs a program against a given configuration

Inputs: [config {:keys [rules axioms]} :- Program]
Returns: [(s/one StorageType "Resulting data store") (s/one #:s{Str s/Num} "Execution stats") (s/one (s/maybe [s/Any]) "Delta IDs")]

Runs a program against a given configuration
raw docstring

schedule-downstream-queueclj/s

(schedule-downstream-queue rules remaining-queue downstream)

Inputs: [rules :- #:s{Str DynamicRule} remaining-queue :- PQueueType downstream :- [RulePatternPair]]

Adds all downstream rules to the queue. The queue will adjust order according to salience, if necessary. Also marks relevant patterns in the downstream rule bodies as dirty.

Inputs: [rules :- #:s{Str DynamicRule} remaining-queue :- PQueueType downstream :- [RulePatternPair]]

Adds all downstream rules to the queue.
 The queue will adjust order according to salience, if necessary.
 Also marks relevant patterns in the downstream rule bodies as dirty.
raw docstring

true*clj/s

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

× close