Liking cljdoc? Tell your friends :D

sweet-tooth.endpoint.datomic.liberator

Helper functions for working with datomic entities.

Transaction results are put in :result in the liberator context.

Helper functions for working with datomic entities.

Transaction results are put in `:result` in the liberator context.
raw docstring

assoc-tempidclj

(assoc-tempid x)
source

auth-owns?clj

(auth-owns? ctx db user-key & [id-key])

Check if the user entity is the same as the authenticated user

Check if the user entity is the same as the authenticated user
sourceraw docstring

connclj

(conn ctx)
source

createclj

(create ctx)

transact the params in a context

transact the params in a context
sourceraw docstring

create->:resultclj

source

created-entityclj

(created-entity ctx)

Use when you've created a single entity and stored the tx result under :result

Use when you've created a single entity and stored the tx result
under :result
sourceraw docstring

created-idclj

(created-id {:keys [result]})

return id of created entity, assuming you've only created one entity

return id of created entity, assuming you've only created one entity
sourceraw docstring

created-pullclj

(created-pull ctx & [pull])

Differs from created-entity in that it returns a map, not a map-like Datomic Entity

Differs from `created-entity` in that it returns a map, not a
map-like Datomic Entity
sourceraw docstring

ctx->create-mapclj

(ctx->create-map ctx)

given a liberator context, returns a map that's ready to be used in a datomic transaction to create an entity

given a liberator context, returns a map that's ready to be used in a
datomic transaction to create an entity
sourceraw docstring

ctx->update-mapclj

(ctx->update-map ctx & [id-key])

cleans up params from liberator context

cleans up params from liberator context
sourceraw docstring

dbclj

(db ctx)
source

db-afterclj

source

db-beforeclj

source

deleteclj

(delete ctx & [id-key])
source

delete->:resultclj

source

deref->:resultclj

(deref->:result tx)

deref a transaction and put the result in :result of ctx.

deref a transaction and put the result in `:result` of ctx.
sourceraw docstring

pull-ctx-idclj

(pull-ctx-id ctx)
source

transact->ctxclj

(transact->ctx tx-fn)
source

updateclj

(update ctx)
source

update->:resultclj

source

updated-entityclj

(updated-entity ctx)

Use when you've updated a single entity and stored the tx result under :result

Use when you've updated a single entity and stored the tx result
under :result
sourceraw docstring

updated-pullclj

(updated-pull ctx & [attrs])

Differs from created-entity in that it returns a map, not a map-like Datomic Entity

Differs from `created-entity` in that it returns a map, not a
map-like Datomic Entity
sourceraw docstring

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

× close