Liking cljdoc? Tell your friends :D

lambdaroyal.memory.core.tx


*alter-context*clj


*calculated-field-lambdas*clj

thread-local hierarchial datastructure that maps collections to map', where map' associates an attribute k to a function (λ [user-scope-tuple] -> [v' c]) that can map the value of attribute k to the value v' if necessary. If the calculation was necessary the c denotes true. If and only if there was any calculation necessary then the user-scope-tuple will contain an association vlicCalculated: xs where x:xs is an attribute a value was calculated before.

thread-local hierarchial datastructure that maps collections to map', where map' associates an attribute k to a function 
(λ [user-scope-tuple] -> [v' c]) that can map the value of attribute k to the value v' if necessary. If the calculation was necessary the c denotes true. If and only if there was any calculation necessary then the user-scope-tuple will contain an association vlicCalculated: xs where x:xs is an attribute a value was calculated before.
raw docstring

*gtid*clj


alter-documentclj

(alter-document tx coll-name user-scope-tuple fn & args)

alters a document given by [user-scope-tuple] within the collection denoted by [coll-name] by applying the function [fn] with the parameters [args] to it. An user-scope-tuple can be obtained using find-first, find and select. returns the new user value

alters a document given by [user-scope-tuple] within the collection denoted by [coll-name] by applying the function [fn] with the parameters [args] to it. An user-scope-tuple can be obtained using find-first, find and select. returns the new user value
raw docstring

applicable-indexesclj

(applicable-indexes coll key)

applicable-indexes'clj

(applicable-indexes' tx coll key)

checks whether collection :coll within the context of a transaction :tx provides an applicable attribute index for the attribute seq :key

checks whether collection :coll within the context of a transaction :tx provides an applicable attribute index for the attribute seq :key
raw docstring

coll-countclj

(coll-count tx coll-name)

returns the number of elements in a collection with name [coll-name]

returns the number of elements in a collection with name [coll-name]
raw docstring

coll-empty?clj

(coll-empty? tx coll-name)

returns true iff the collection with name [coll-name] is empty

returns true iff the collection with name [coll-name] is empty
raw docstring

Constraintcljprotocol

applicationclj

(application this)

returns a set of database actions this constraint type is relevant for

returns a set of database actions this constraint type is relevant for

postcommitclj

(postcommit this ctx coll application coll-tuple)

This function gets called after a key/value pair is inserted to/updated within a collection. Constraint like indexes implement this for the update of the very index after the update to the key/value pair data structure took place

This function gets called after a key/value pair is inserted to/updated within a collection. Constraint like indexes implement this for the update of the very index after the update to the key/value pair data structure took place

precommitclj

(precommit this ctx coll application key value)

This function gets called before a key/value pair is inserted to/updated within a collection. Implementing this function if a necessary precondition needs to be checked before performing an costly update to the underlying datastructure holding the key/value pair. Implementations should raise. Here ctx aims to handle constraint to need to check on other collections as well

This function gets called before a key/value pair is inserted to/updated within a collection. Implementing this function if a necessary precondition needs to be checked before performing an costly update to the underlying datastructure holding the key/value pair. Implementations should raise. Here ctx aims to handle constraint to need to check on other collections as well

constraint-appl-domainclj

donotes database actions suitable for certain types of domains

donotes database actions suitable for certain types of domains
raw docstring

contains-key?clj

(contains-key? coll key)

returns true iff the collection [coll] contains a tuple whose key is equal to the user key [key].

returns true iff the collection [coll] contains a tuple whose key is equal to the user key [key].
raw docstring

create-attribute-indexclj

(create-attribute-index name unique a)

creates an attribute index for attributes a

creates an attribute index for attributes a
raw docstring

create-constraint-exceptionclj

(create-constraint-exception coll key msg)

create-no-applicable-index-exceptionclj

(create-no-applicable-index-exception coll key)

create-referenced-integrity-constraintclj

(create-referenced-integrity-constraint name referencing-coll referencing-key)

create-referrer-integrity-constraintclj

(create-referrer-integrity-constraint name foreign-coll foreign-key)

create-txclj

(create-tx ctx & opts)

creates a transaction upon user-scope function like select, insert, alter-document, delete can be executed. Iff an eviction channel is assigned to a collection then this channel needs to be started otherwise a

creates a transaction upon user-scope function like select, insert, alter-document, delete can be executed. Iff an eviction channel is assigned to a collection then this channel needs to be started otherwise a 
raw docstring

create-unique-keyclj

(create-unique-key key)
(create-unique-key coll key)
(create-unique-key coll key primary-key)

creates a unique key [key running] from a user space key using the running bigint index key is a seq of attributes values for all attributes of the index We pass in primary key in order to sort indexed results by primary-key.

creates a unique key [key running] from a user space key using the running bigint index key is a seq of attributes values for all attributes of the  index
We pass in primary key in order to sort indexed results by primary-key.
raw docstring

create-unique-key-constraintclj

(create-unique-key-constraint)

create-unique-stop-keyclj

(create-unique-stop-key key primary-key-is-string)

creates a unique key [key running] that can be used for < and <= comparator

creates a unique key [key running] that can be used for < and <= comparator
raw docstring

debugclj


decorate-coll-with-gtidclj

(decorate-coll-with-gtid coll gtid)

decorate-with-gtidclj

(decorate-with-gtid val)

deleteclj

(delete tx coll-name key)

deletes a document by key [key] from collection with name [coll-name] using the transaction [tx]. the transaction can be created from context using (create-tx [context]. returns number of removed items.

deletes a document by key [key] from collection with name [coll-name] using the transaction [tx]. the transaction can be created from context using (create-tx [context]. returns number of removed items.
raw docstring

find-firstclj

(find-first coll key)

returns the first collection tuple whose key is equal to the user key [key]. This is not a userscope method.

returns the first collection tuple whose key is equal to the user key [key]. This is not a userscope method.
raw docstring

get-gtidclj

(get-gtid)

get-scoped-user-scope-tupleclj

(get-scoped-user-scope-tuple collection)

gtidclj


gtid-dosynccljmacro

(gtid-dosync & body)

Indexcljprotocol

applicable?clj

(applicable? this key)

return true iff this index can be used to find values as per the given key.

return true iff this index can be used to find values as per the given key.

findclj

(find this start-test start-key stop-test stop-key)

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized or (stop-test stop-key) is fulfilled. start-test as well as stop-test are of >,>=,<,<=. The returning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized or (stop-test stop-key) is fulfilled. start-test as well as stop-test are of >,>=,<,<=. The returning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v

find-without-stopclj

(find-without-stop this start-test start-key)

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized. start-test is of >,>=,<,<=. The returning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized. start-test is of >,>=,<,<=. The returning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v

get-dataclj

(get-data this)

For testing purposes

For testing purposes

ratingclj

(rating this key)

returns a natural number denoting an order by which two indexes can be compared in order to use one for a finding a certain key. the index with the lower rating result wins

returns a natural number denoting an order by which two indexes can be compared in order to use one for a finding a certain key. the index with the lower rating result wins

insertclj

(insert tx coll-name key value)

inserts a document [value] by key [key] into collection with name [coll-name] using the transaction [tx]. the transaction can be created from context using (create-tx [context])

inserts a document [value] by key [key] into collection with name [coll-name] using the transaction [tx]. the transaction can be created from context using (create-tx [context])
raw docstring

insert-rawclj

(insert-raw tx coll-name key value)

ONLY FOR INTERNAL PURPOSE

ONLY FOR INTERNAL PURPOSE
raw docstring

process-constraintsclj

(process-constraints application f ctx coll & attr)

ReverseIndexcljprotocol

rfindclj

(rfind this start-test start-key stop-test stop-key)

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized or (stop-test stop-key) is fulfilled. start-test as well as stop-test are of >,>=,<,<=. The retcrrning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v. yields reverse order

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized or (stop-test stop-key) is fulfilled. start-test as well as stop-test are of >,>=,<,<=. The retcrrning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v. yields reverse order

rfind-without-stopclj

(rfind-without-stop this start-test start-key)

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized. start-test is of >,>=,<,<=. The returning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v. yields reverse order

takes all values from the collection using this index that fulfil (start-test start-key) until the collection is fully realized. start-test is of >,>=,<,<=. The returning sequence contains of items [[uk i] (ref v)], where uk is the user-key, i is the running index for the collection and (ref v) denotes a STM reference type instance to the value v. yields reverse order

rselectclj

(rselect tx coll-name)
(rselect tx coll-name start-test start-key)
(rselect tx coll-name attributes start-test start-key)
(rselect tx coll-name start-test start-key stop-test stop-key)
(rselect tx coll-name attributes start-test start-key stop-test stop-key)

REVERSE ORDER SELECT. test(s) one of <, <=, > or

=. Returns a seq of those entries [key, value] with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true. iff just [tx] and coll-name are given, then we return all tupels starting from the highest rank to the lowest rank

REVERSE ORDER SELECT. test(s) one of <, <=, > or
>=. Returns a seq of those entries [key, value] with keys ek for
which (test (.. sc comparator (compare ek key)) 0) is true. iff just [tx] and coll-name are given, then we return all tupels starting from the highest rank to the lowest rank
raw docstring

rselect-from-collclj

(rselect-from-coll coll attributes start-test start-key)
(rselect-from-coll coll attributes start-test start-key stop-test stop-key)

Secondary index scan in reverse order

Secondary index scan in reverse order
raw docstring

selectclj

(select tx coll-name)
(select tx coll-name start-test start-key)
(select tx coll-name attributes start-test start-key)
(select tx coll-name start-test start-key stop-test stop-key)
(select tx coll-name attributes start-test start-key stop-test stop-key)

test(s) one of <, <=, > or

=. Returns a seq of those entries [key, value] with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true. iff just [tx] and coll-name are given, then we return all tupels.

test(s) one of <, <=, > or
>=. Returns a seq of those entries [key, value] with keys ek for
which (test (.. sc comparator (compare ek key)) 0) is true. iff just [tx] and coll-name are given, then we return all tupels.
raw docstring

select-firstclj

(select-first tx coll-name key)

returns the first key/value pair of the collection [coll-name] that matches the key [key] or nil

returns the first key/value pair of the collection [coll-name] that matches the key [key] or nil
raw docstring

select-from-collclj

(select-from-coll coll attributes start-test start-key)
(select-from-coll coll attributes start-test start-key stop-test stop-key)

Secondary index scan

Secondary index scan
raw docstring

treeclj

(tree tx coll-name user-scope-tuple & opts)

takes a document [user-scope-tuple] from the collection with name [coll-name] and gives back derived document where all foreign keys are replaced by their respective documents.

takes a document [user-scope-tuple] from the collection with name [coll-name] and gives back derived document where all foreign keys are replaced by their respective documents.
raw docstring

tree-referenceesclj

(tree-referencees tx coll-name user-scope-tuple & opts)

takes a document [user-scope-tuple] from the collection with name [coll-name] and gives back a hash-map denoting all foreign-key referenced documents. The key in hash-map is [coll-name user-scope-key].

takes a document [user-scope-tuple] from the collection with name [coll-name] and gives back a hash-map denoting all foreign-key referenced documents. The key in hash-map is [coll-name user-scope-key].
raw docstring

tree-verboseclj


user-scope-keyclj

(user-scope-key user-scope-tuple)

takes a user-scope-tuple into account and returns the user scope key that was provided when storing this document

takes a user-scope-tuple into account and returns the user scope key that was provided when storing this document
raw docstring

user-scope-tupleclj

(user-scope-tuple x)
(user-scope-tuple scoped-calculated-field-lambdas x)

within a collection a key-value-pair consists of k -> r, where k is [uk i], r is a STM reference to document v, uk is the key the user used to store document v. i is a running index that allows the uk being non-unique with respect to the collection. since v is wrapped by an STM reference we provide back the raw value v in order to prevent the user from altering the value using STM mechanism directly, since this would bypass the secondary indexes and make them invalid.

within a collection a key-value-pair consists of k -> r, where k is [uk i], r is a STM reference to document v, uk
is the key the user used to store document v. i is a running index that allows
the uk being non-unique with respect to the collection. since v is wrapped by an STM reference we provide back the _raw_ value v in order to prevent the user from altering the value using STM mechanism directly, since this would bypass the secondary indexes and make them invalid.
raw docstring

with-calculated-field-lambdascljmacro

(with-calculated-field-lambdas lambdas & body)

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

× close