Liking cljdoc? Tell your friends :D

lambdaroyal.memory.abstraction.search


<<clj

(<< target filter-fn & opts)

Reverse Pipe. Returns all tupels from target that match the keys.

Reverse Pipe. Returns all tupels from target that match the keys.
sourceraw docstring

<<<clj

(<<< target & opts)

Pipe, Convenience Function. Returns all tupels from target that match the keys.

Pipe, Convenience Function. Returns all tupels from target that match the keys.
sourceraw docstring

>>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. opts can also contain :reverse true to yield the tupels of the target collection in reverse order

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. opts can also contain :reverse true to yield the tupels of the target collection in reverse order
sourceraw 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.
sourceraw 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.
sourceraw 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
sourceraw docstring

by-referenceesclj

(by-referencees tx source target xs & opts)

returns all user scope tuples from collection [target] that are referenced to collection [target] by some ReferencedIntegrityConstraint and have primary key as per the foreign keys within xs. the sequence is supposed to be redundancy free (set).

returns all user scope tuples from collection [target] that are referenced to collection [target] by some ReferencedIntegrityConstraint and have primary key as per the foreign keys within xs. the sequence is supposed to be redundancy free (set).
sourceraw 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
sourceraw docstring

check-break-condition-reachedclj

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

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

concat-aggregatorclj

(concat-aggregator ref data)

assumes ref to be a vector reference

assumes ref to be a vector reference
sourceraw 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]
sourceraw 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
sourceraw 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]
sourceraw 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]
sourceraw 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
sourceraw 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.
sourceraw 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.
sourceraw docstring

hierarchie-backtracking-intclj

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

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

inc-and-check-break-condition-reachedclj

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

is-stop-feeding-aggregatorclj

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

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

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

× close