Liking cljdoc? Tell your friends :D

lambdaroyal.memory.abstraction.search


>>clj

(>> target filter-fn & opts)

Pipe, Convenience Function. A higher order function that returns a function taking a transaction [tx] and a set of user scope tupels into account that MUST aggregate as meta data key :coll-name the collection the tupels belong to, the lambda returns itself a by-ric from source collection as per the input xs to target location. The filter is applied to the xs. If the :foreign-key is given within the opts then we explicitly seach for a ric with a certain foreign-key.

Pipe, Convenience Function. A higher order function that returns a function taking a transaction [tx] and a set of user scope tupels into account that MUST aggregate as meta data key :coll-name the collection the tupels belong to, the lambda returns itself a by-ric from source collection as per the input xs to target location. The filter is applied to the xs. If the :foreign-key is given within the opts then we explicitly seach for a ric with a certain foreign-key.
raw docstring

>>>clj

(>>> target & opts)

Pipe, Convenience Function. A higher order function that returns a function taking a transaction [tx] and a set of user scope tupels into account that MUST aggregate as meta data key :coll-name the collection the tupels belong to, the lambda returns itself a by-ric from source collection as per the input xs to target location. If the :foreign-key is given within the opts then we explicitly seach for a ric with a certain foreign-key.

Pipe, Convenience Function. A higher order function that returns a function taking a transaction [tx] and a set of user scope tupels into account that MUST aggregate as meta data key :coll-name the collection the tupels belong to, the lambda returns itself a by-ric from source collection as per the input xs to target location. If the :foreign-key is given within the opts then we explicitly seach for a ric with a certain foreign-key.
raw docstring

(abstract-search λ)

higher order function - takes a function [fn] that returns a lazy sequence [s] of user-scope tuples from lambdaroyal memory. This function returns a function that returns a channel where the result of the function fn, s is pushed to.

higher order function - takes a function [fn] that returns a lazy sequence [s] of user-scope tuples from lambdaroyal memory. This function returns a function that returns a channel where the result of the function fn, s is pushed to.
raw docstring

break-condition-stateclj

(break-condition-state max-result-count)

creates a map with :result-count, :max-result-count as well as :stop-feeding-aggregator that can be optionally feeded to a combined search in order to dynamically stop async searches when individual search function returned enough results

creates a map with :result-count, :max-result-count as well as :stop-feeding-aggregator that can be optionally feeded to a combined search in order to dynamically stop async searches when individual search function returned enough results
raw docstring

by-ricclj

(by-ric tx source target keys & opts)

returns all user scope tuples from collection [source] that refer to collection [target] by some ReferrerIntegrityConstraint and have foreign-key of the sequence [keys]. the sequence is supposed to be redundancy free (set). opts might contain :ratio-full-scan iff greater or equal to the ratio (count keys / number of tuples in target of [0..1]) then the source collection is fully scanned for matching tuples rather than queried by index lookups. If not given, 0.4 is the default barrier. If the :foreign-key is given within the opts then we explicitly seach for a ric with a certain foreign-key. :abs-full-scan iff the number of keys is greater than the abs-full-scan, then the source collection is fully scanned for matching tuples rather and queries by index lookups

returns all user scope tuples from collection [source] that refer to collection [target] by some ReferrerIntegrityConstraint and have foreign-key of the sequence [keys]. the sequence is supposed to be redundancy free (set). opts might contain :ratio-full-scan iff greater or equal to the ratio (count keys / number of tuples in target of [0..1]) then the source collection is fully scanned for matching tuples rather than queried by index lookups. If not given, 0.4 is the default barrier. If the :foreign-key is given within the opts then we explicitly seach for a ric with a certain foreign-key. :abs-full-scan iff the number of keys is greater than the abs-full-scan, then the source collection is fully scanned for matching tuples rather and queries by index lookups
raw docstring

check-break-condition-reachedclj

(check-break-condition-reached break-condition-state)

(combined-search fns agr query & opts)

higher order function - takes a sequence of concrete functions (abstract-search) [fns] a aggregator function [agr], a query parameter [query] (can be a sequence) and optional parameters [opts] and returns go block. all the search functions [fns] are called with parameter [query] executed in parallel and feed their result (a sequence of user-scope tuples from lambdaroyal memory) to the aggregator function [agr]. By default the resulting go routine waits for all fn in [fns] for delivering a result.

The following options are accepted

:timeout value in ms after which the aggregator channel is closed, no more search results are considered.

:minority-report number of search function fn in [fns] that need to result in order to close the aggregator channel is closed and no more search results are considered.

:finish-callback a function with no params that gets called when the aggregator go block stops.

:break-condition-state containing ... :max-result-count a long denoting the max number of results to be considered. MUST BE USED IN CONJUNCTION WITH :result-count. Is relevant iff all individual search functions return a sequence. Keep in mind that the individual search functions are responsible for altering the reference of :result-count :result-count an atom referencing a long denoting the current number of results fetched so far. MUST BE USED IN CONJUNCTION WITH :max-result-count. Keep in mind that the individual search functions are responsible for altering the reference of :result-count :stop-feeding-aggregator an atom referencing a long. set by aggregator function in order to stop the loop receiving results from individual search functions. CAN BE USED IN CONJUNCTION WITH :max-result-count and :result-count.

higher order function - takes a sequence of concrete functions (abstract-search) [fns] a aggregator function [agr], a query parameter [query] (can be a sequence) and optional parameters [opts] and returns go block. all the search functions [fns] are called with parameter [query] executed in parallel and feed their result (a sequence of user-scope tuples from lambdaroyal memory) to the aggregator function [agr]. By default the resulting go routine waits for all fn in [fns] for delivering a result.

The following options are accepted

:timeout value in ms after which the aggregator channel is closed, no more search results are considered.

:minority-report number of search function fn in [fns] that need to result in order to close the aggregator channel is closed and no more search results are considered.

:finish-callback a function with no params that gets called when the aggregator go block stops.

:break-condition-state containing ...
:max-result-count a long denoting the max number of results to be considered. MUST BE USED IN CONJUNCTION WITH :result-count. Is relevant iff all individual search functions return a sequence. Keep in mind that the individual search functions
are responsible for altering the reference of :result-count
:result-count an atom referencing a long denoting the current number of results fetched so far. MUST BE USED IN CONJUNCTION WITH :max-result-count. Keep in mind that the individual search functions
are responsible for altering the reference of :result-count
:stop-feeding-aggregator an atom referencing a long. set by aggregator function in order to stop the loop receiving results from individual search functions. CAN BE USED IN CONJUNCTION WITH :max-result-count and :result-count.
raw docstring

combined-search'clj

(combined-search' agr fns query & opts)

derives from lambdaroyal.memory.abstraction.search/combined-search - higher order function - takes a aggregator function [agr], a sequence of concrete functions (abstract-search), a query parameter [query] (can be a sequence) and optional parameters [opts] and returns go block. all the search functions [fns] are called with parameter [query] executed in parallel and feed their result (a sequence of user-scope tuples from lambdaroyal memory) to the aggregator function [agr]. By default the resulting go routine waits for all fn in [fns] for delivering a result.

The following options are accepted

:timeout value in ms after which the aggregator channel is closed, no more search results are considered.

:minority-report number of search function fn in [fns] that need to result in order to close the aggregator channel is closed and no more search results are considered.

:finish-callback a function with no params that gets called when the aggregator go block stops.

derives from lambdaroyal.memory.abstraction.search/combined-search - 
higher order function - takes a aggregator function [agr], a sequence of concrete functions (abstract-search), a query parameter [query] (can be a sequence) and optional parameters [opts] and returns go block. all the search functions [fns] are called with parameter [query] executed in parallel and feed their result (a sequence of user-scope tuples from lambdaroyal memory) to the aggregator function [agr]. By default the resulting go routine waits for all fn in [fns] for delivering a result.

The following options are accepted

:timeout value in ms after which the aggregator channel is closed, no more search results are considered.

:minority-report number of search function fn in [fns] that need to result in order to close the aggregator channel is closed and no more search results are considered.

:finish-callback a function with no params that gets called when the aggregator go block stops.
raw docstring

combined-search''clj

(combined-search'' fns query finish-callback & opts)

SET SEARCH - derives from lambdaroyal.memory.abstraction.search/combined-search - higher order function - takes a sequence of concrete functions (abstract-search), a query parameter [query] (can be a sequence), a function [finish-callback] and optional parameters [opts] and returns go block. all the search functions [fns] are called with parameter [query] executed in parallel and feed their result (a sequence of user-scope tuples from lambdaroyal memory) to the aggregator function sorted-set-aggregator. the finish-callback takes one paremeter, the dereferenced aggregator value, in layman terms, all the documents that were found by the aggregator. By default the resulting go routine waits for all fn in [fns] for delivering a result.

The following options are accepted\n :timeout value in ms after which the aggregator channel is closed, no more search results are considered.\n :minority-report number of search function fn in [fns] that need to result in order to close the aggregator channel is closed and no more search results are consfidered.

SET SEARCH - derives from lambdaroyal.memory.abstraction.search/combined-search - 
higher order function - takes a sequence of concrete functions (abstract-search), a query parameter [query] (can be a sequence), a function [finish-callback]  and optional parameters [opts] and returns go block. all the search functions [fns] are called with parameter [query] executed in parallel and feed their result (a sequence of user-scope tuples from lambdaroyal memory) to the aggregator function sorted-set-aggregator. the finish-callback takes one paremeter, the dereferenced aggregator value, in layman terms, all the documents that were found by the aggregator. By default the resulting go routine waits for all fn in [fns] for delivering a result.

The following options are accepted\n 
:timeout value in ms after which the aggregator channel is closed, no more search results are considered.\n
:minority-report number of search function fn in [fns] that need to result in order to close the aggregator channel is closed and no more search results are consfidered.
raw docstring

concat-aggregatorclj

(concat-aggregator ref data)

assumes ref to be a vector reference

assumes ref to be a vector reference
raw docstring

filter-allclj

(filter-all tx coll-name)

higher order function that returns a function that returns a sequence of all tuples within the collection with name [coll-name]

higher order function that returns a function that returns a sequence of all tuples within the collection with name [coll-name]
raw docstring

filter-indexclj

(filter-index tx coll-name attr start-test start-key)
(filter-index tx coll-name attr start-test start-key stop-test stop-key)

higher order function that returns a function that returns a sequence of all tupels that are resolved using a index lookup using the attribute seq [attr] and the comparator [start-test] as well as the attribute value sequence [start-key]. The second version 'lambdas' the index search for a range additionally taking [stop-test] and [stop-key] into account

higher order function that returns a function that returns a sequence of all tupels that are resolved using a index lookup using the attribute seq [attr] and the comparator [start-test] as well as the attribute value sequence [start-key]. The second version 'lambdas' the index search for a range additionally taking [stop-test] and [stop-key] into account
raw docstring

filter-keyclj

(filter-key tx coll-name key)
(filter-key tx coll-name start-test start-key)
(filter-key tx coll-name start-test start-key stop-test stop-key)

higher order function that returns a function that returns a sequence of all tupels whose key is equal to [key]

higher order function that returns a function that returns a sequence of all tupels whose key is equal to [key]
raw docstring

filter-xsclj

(filter-xs coll-name xs)

higher order function that returns a function that returns a sequence of all tuples within xs that need to belong the collection with name [coll-name]

higher order function that returns a function that returns a sequence of all tuples within xs that need to belong the collection with name [coll-name]
raw docstring

gen-sorted-setclj

(gen-sorted-set)

generates a STM ref on a sorted set that can be used in conjunction with set-aggregator

generates a STM ref on a sorted set that can be used in conjunction with set-aggregator
raw docstring

hierarchieclj

(hierarchie xs handler & levels)

[level] is variable arity set of keywords or function taking a document into account and providing back a category. [handler] is a function applied to the leafs of the hierarchie. Using identity as function will result the documents as leafs.

[level] is variable arity set of keywords or function taking a document into account and providing back a category. [handler] is a function applied to the leafs of the hierarchie. Using identity as function will result the documents as leafs.
raw docstring

hierarchie-backtrackingclj

(hierarchie-backtracking xs handler λbacktracking & levels)

[level] is variable arity set of keywords or function taking a document into account and providing back a category. [handler] is a function applied to the leafs of the hierarchie. Using identity as function will result the documents as leafs. λbacktracking-fn must accept boolean flag that denotes whether we inspect leafs, the group key k, and a sequence of elements that result from applying a level discriminator to xs. k is [level-val count], where level-val denotes the result of applying the level discrimator function, count the number of elements WITHIN the next recursion matching the category. The function must return a adapted version of k that reflects the information necessary to the user.

[level] is variable arity set of keywords or function taking a document into account and providing back a category. [handler] is a function applied to the leafs of the hierarchie. Using identity as function will result the documents as leafs. 
λbacktracking-fn must accept boolean flag that denotes whether we inspect leafs, the group key k, and a sequence of elements that result from applying a level discriminator to xs. k is [level-val count], where level-val denotes the result of applying the level discrimator function, count the number of elements WITHIN the next recursion matching the category. The function must return a adapted version of k that reflects the information necessary to the user.
raw docstring

hierarchie-backtracking-intclj

(hierarchie-backtracking-int initial xs handler λbacktracking & levels)

hierarchie-extclj

(hierarchie-ext xs handler & levels)

builds up a hierarchie where a node is given by it's key (level discriminator), a map containing extra info that are characteristic for (an arbitrary) document that fits into this hierarchie as well as all the matching documents classified by the values of the next category (if any) or the matching documents as subnodes. [level] is variable arity set of taking a document into account and providing back a tuple [category ext], where category is a keyword or function providing back the category of a document whereas ext is a keyword or function providing back the the characteristics of a document with respect to the category. [handler] is a function applied to the leafs of the hierarchie. Using identity as function will result the documents as leafs.

builds up a hierarchie where a node is given by it's key (level discriminator), a map containing extra info that are characteristic for (an arbitrary) document that fits into this hierarchie as well as all the matching documents classified by the values of the next category (if any) or the matching documents as subnodes.
[level] is variable arity set of taking a document into account and providing back a tuple [category ext], where category is a keyword or function providing back the category of a document whereas ext is a keyword or function providing back the the characteristics of a document with respect to the category. [handler] is a function applied to the leafs of the hierarchie. Using identity as function will result the documents as leafs.
raw docstring

inc-and-check-break-condition-reachedclj

(inc-and-check-break-condition-reached break-condition-state)

is-stop-feeding-aggregatorclj

(is-stop-feeding-aggregator break-condition-state)

projclj

(proj tx λ & path-fns)

data projection - takes a higher order functions λ into account that that returns a function whose application results in a seq of user scope tupels AND metadata with :coll-name denoting the collection the tupels belong to. Furthermore this function takes a variable number of path functions [path-fns] into account. The first one is supposed to take the outcome of application of λ into account, all others are supposes to take the outcome of the respective predessor path-fn into account. All are supposed to produce a seq of user scope tupels into account that is consumable be the respective successor path-fn AND metadata denoting the collection name by key :coll-name.

data projection - takes a higher order functions λ into account that that returns a function whose application results in a seq of user scope tupels AND metadata with :coll-name denoting the collection the tupels belong to. Furthermore this function takes a variable number of path functions [path-fns] into account. The first one is supposed to take the outcome of application of λ into account, all others are supposes to take the outcome of the respective predessor path-fn into account. All are supposed to produce a seq of user scope tupels into account that is consumable be the respective successor path-fn AND metadata denoting the collection name by key :coll-name.
raw docstring

ricclj

(ric tx source target)
(ric tx source target foreign-key)

returns the first identified ReferrerIntegrityConstraint from a collection [source] that refers to a collection [target]. If the [foreign-key] is given then we explicitly seach for a ric with a certain foreign-key.

returns the first identified ReferrerIntegrityConstraint from a collection [source] that refers to a collection [target]. If the [foreign-key] is given then we explicitly seach for a ric with a certain foreign-key.
raw docstring

set-aggregatorclj

(set-aggregator ref data)

assumes that data to be aggregated in are collection tupels where the document (second element) contains a key :coll denoting the collection the tuple belongs to. yields a set of collection tuples. assumes the ref to be a set

assumes that data to be aggregated in are collection tupels where the document (second element) contains a key :coll denoting the collection the tuple belongs to. yields a set of collection tuples. assumes the ref to be a set
raw docstring

sorted-set-aggregatorclj

(sorted-set-aggregator ref data)

assumes that data to be aggregated in are collection tupels where the document (second element) contains a key :coll denoting the collection the tuple belongs to and all the keys (first element) are comparable with each other yields a set of collection tuples. assumes that ref denotes a sorted-set-by. the keys of the map are (collection tuple-key)

assumes that data to be aggregated in are collection tupels where the document (second element) contains a key :coll denoting the collection the tuple belongs to and all the keys (first element) are comparable with each other yields a set of collection tuples. assumes that ref denotes a sorted-set-by. the keys of the map are (collection tuple-key)
raw docstring

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

× close