Liking cljdoc? Tell your friends :D

c3kit.bucket.db

cljs

A Simple in-memory database. Data pulled from the server is stored here to be easily retrieved some time later.

A Simple in-memory database.
Data pulled from the server is stored here to be easily retrieved some time later.
raw docstring

->eidclj

(->eid id-or-entity)

Returns the entity id

Returns the entity id
raw docstring

attributes->entityclj

(attributes->entity attributes id)
(attributes->entity attributes id kind)

atx*clj

(atx* entities)

Asynchronous transact. Returns a future containing the transacted entities. Ideal for large imports or when multiple entities need to be transacted in a single transaction.

Asynchronous transact.  Returns a future containing the transacted entities.
Ideal for large imports or when multiple entities need to be transacted in a single transaction.
raw docstring

build-attributeclj

(build-attribute kind [attr-name type & spec])

build-enum-schemaclj

(build-enum-schema enum values)

build-schemaclj

(build-schema kind attribute-specs)

casclj

(cas entity & old-attr-value-pairs)

compare-and-swap - Returns entity with CAS metadata. When transacted, only the specified attributes will be saved. If the values don't match, an exception will be thrown. User cas-ex? to check for CAS conflict. Only use with existing entities. Do not include the entity along with a CAS version in the same transaction. -> https://docs.datomic.com/cloud/transactions/transaction-functions.html#db-cas -> https://docs.datomic.com/cloud/best.html#optimistic-concurrency

compare-and-swap - Returns entity with CAS metadata.  When transacted, only the specified attributes will be saved.
If the values don't match, an exception will be thrown.  User cas-ex? to check for CAS conflict.
Only use with existing entities.
Do not include the entity along with a CAS version in the same transaction.
-> https://docs.datomic.com/cloud/transactions/transaction-functions.html#db-cas
-> https://docs.datomic.com/cloud/best.html#optimistic-concurrency
raw docstring

cas-ex?clj

(cas-ex? e)

clear!cljs

(clear!)

configclj


connectclj

(connect uri)

connectionclj


count-allclj/s≠

clj
(count-all kind)
(count-all kind attr)

Attribute must be a qualified attribute name like :user/email :airport/code Returns count of entities where attribute has a value.

Attribute must be a qualified attribute name like :user/email :airport/code
Returns count of entities where attribute has a value.
cljs
(count-all kind)
(count-all kind attr)
raw docstring

count-byclj/s≠

clj
(count-by kind & pairs)

Counts all entities with the given attribute(s) equal to the given value(s)

Counts all entities with the given attribute(s) equal to the given value(s)
cljs
(count-by kind & kv)
raw docstring

created-atclj

(created-at id-or-entity)

Returns the instant (java.util.Date) the entity was created.

Returns the instant (java.util.Date) the entity was created.
raw docstring

current-schemaclj

(current-schema)

Returns a list of all the fully qualified fields in the schema.

Returns a list of all the fully qualified fields in the schema.
raw docstring

datomic-entityclj

(datomic-entity id-or-e)

dbclj

(db)

db-as-ofclj

(db-as-of t)

dissoc-nilsclj

(dissoc-nils entity)

entityclj/s

(entity id)

entity!clj/s

(entity! id)

entity-as-of-txclj

(entity-as-of-tx db eid kind txid)

Loads the entity as it existed when the transaction took place, adding :db/tx (transaction id) and :db/instant (date) attributes to the entity.

Loads the entity as it existed when the transaction took place, adding :db/tx (transaction id)
and :db/instant (date) attributes to the entity.
raw docstring

entity-of-kindclj/s

(entity-of-kind kind id)

entity-of-kind!clj/s

(entity-of-kind! kind id)

excise!clj

(excise! id-or-e)

Remove entity from database history.

Remove entity from database history.
raw docstring

ffind-byclj/s≠

clj
(ffind-by kind attr value)
(ffind-by kind attr1 val1 attr2 val2)
(ffind-by kind attr1 val1 attr2 val2 & pairs)

Same as (first (find-by ...))

Same as (first (find-by ...))
cljs
(ffind-by kind & kvs)
raw docstring

find-allclj/s≠

clj
(find-all kind)
(find-all kind attr)

Attribute must be a qualified attribute name like :user/email :airport/code Returns all entities where the value is not empty.

Attribute must be a qualified attribute name like :user/email :airport/code
Returns all entities where the value is not empty.
cljs
(find-all kind)
(find-all kind attr)
raw docstring

find-byclj/s≠

clj
(find-by kind attr value)
(find-by kind attr1 val1 & pairs)

Searches for all entities with the given attribute(s) equal to the given value(s)

Searches for all entities with the given attribute(s) equal to the given value(s)
cljs
(find-by kind & kvs)
raw docstring

find-entitiesclj

(find-entities query & args)

Takes a datalog query and returns realized (de-namespaced) entities.

Takes a datalog query and returns realized (de-namespaced) entities.
raw docstring

garbage-identsclj

(garbage-idents)

Returns a list of all the idents starting with :garbage.

Returns a list of all the idents starting with :garbage.
raw docstring

historyclj

(history entity)

Returns a list of every version of the entity form creation to current state, with :db/tx and :db/instant attributes.

Returns a list of every version of the entity form creation to current state,
with :db/tx and :db/instant attributes.
raw docstring

insert-formclj

(insert-form id entity)

inspectclj

(inspect)

For use in REPL or development. Prints the qualified names of all fields, alphebetically, in the schema.

For use in REPL or development.
Prints the qualified names of all fields, alphebetically, in the schema.
raw docstring

inspect-tableclj


maybe-cas-formclj

(maybe-cas-form entity)

maybe-retract-formclj

(maybe-retract-form entity)

partition-nameclj

(partition-name)

partition-schemaclj

(partition-schema)
(partition-schema partition-name)

Return transact-able form to add a partition with name

Return transact-able form to add a partition with name
raw docstring

qclj

(q query & args)

Raw datomic query and request

Raw datomic query and request
raw docstring

q->entitiesclj

(q->entities result)

read-configclj

(read-config)

reloadclj/s

(reload e)

replace-db-atom!cljs

(replace-db-atom! new-atom)

reserved-attr-nsesclj


resolve-idclj

(resolve-id result id)

retractclj/s≠

(retract id-or-entity)
clj

Basically 'deletes' an entity.

Basically 'deletes' an entity.
raw docstring

scope-attributeclj

(scope-attribute kind attr)

scope-attributesclj

(scope-attributes kind attributes)

serviceclj


squuidclj/s≠

clj
cljs
(squuid)

startclj

(start app)

stopclj

(stop app)

tempidclj/s

(tempid)

tempid?clj


transact!clj

(transact! transaction)
(transact! transaction connection)

txclj/s≠

(tx & args)
clj

Transacts (save, update, or retract) the entity. Arguments, assumed to be in key-value pairs, will be merged into the entity prior to saving. Retracts entity when it's metadata has :retract.

Transacts (save, update, or retract) the entity.
Arguments, assumed to be in key-value pairs, will be merged into the entity prior to saving.
Retracts entity when it's metadata has :retract.
raw docstring

tx*clj/s≠

(tx* entities)
clj

Transact multiple entities, synchronously

Transact multiple entities, synchronously
raw docstring

tx-entity-formclj

(tx-entity-form entity)

tx-formclj

(tx-form entity)

tx-idsclj

(tx-ids eid)

Returns a sorted list of all the transaction ids in which the entity was updated.

Returns a sorted list of all the transaction ids in which the entity was updated.
raw docstring

update-formclj

(update-form id updated)

updated-atclj

(updated-at id-or-entity)

Returns the instant (java.util.Date) this entity was last updated.

Returns the instant (java.util.Date) this entity was last updated.
raw docstring

value-or-idclj

(value-or-id v)

with-timestampsclj

(with-timestamps entity)

Adds :created-at and :updated-at timestamps to the entity.

Adds :created-at and :updated-at timestamps to the entity.
raw docstring

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

× close