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.
(attributes->entity attributes id)
(attributes->entity attributes id kind)
(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.
(build-attribute kind [attr-name type & spec])
(build-enum-schema enum values)
(build-schema kind attribute-specs)
(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
(cas-ex? e)
(clear!)
(connect uri)
(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.
(count-all kind)
(count-all kind attr)
(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)
(count-by kind & kv)
(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.
(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.
(datomic-entity id-or-e)
(db)
(db-as-of t)
(dissoc-nils entity)
(entity id)
(entity! id)
(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.
(entity-of-kind kind id)
(entity-of-kind! kind id)
(excise! id-or-e)
Remove entity from database history.
Remove entity from database history.
(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 ...))
(ffind-by kind & kvs)
(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.
(find-all kind)
(find-all kind attr)
(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)
(find-by kind & kvs)
(find-entities query & args)
Takes a datalog query and returns realized (de-namespaced) entities.
Takes a datalog query and returns realized (de-namespaced) entities.
(garbage-idents)
Returns a list of all the idents starting with :garbage.
Returns a list of all the idents starting with :garbage.
(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.
(insert-form id entity)
(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.
(maybe-cas-form entity)
(maybe-retract-form entity)
(partition-name)
(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
(q->entities result)
(read-config)
(reload e)
(replace-db-atom! new-atom)
(resolve-id result id)
(retract id-or-entity)
Basically 'deletes' an entity.
Basically 'deletes' an entity.
(scope-attribute kind attr)
(scope-attributes kind attributes)
(squuid)
(start app)
(stop app)
(tempid)
(transact! transaction)
(transact! transaction connection)
(tx & args)
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.
(tx* entities)
Transact multiple entities, synchronously
Transact multiple entities, synchronously
(tx-entity-form entity)
(tx-form entity)
(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.
(update-form id updated)
(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.
(value-or-id v)
(with-timestamps entity)
Adds :created-at and :updated-at timestamps to the entity.
Adds :created-at and :updated-at timestamps to the entity.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close