(check-db-migrated!)
Throws if (not (db-migrated?))
Throws if (not (db-migrated?))
(create type attributes)
Creates an entity from unqualified attributes.
Example usage:
(create :user {:name Joel
:email test@test.com
})
Creates an entity from unqualified attributes. Example usage: (create :user {:name `Joel` :email `test@test.com`})
(dates eid)
First and last dates associated with an eid
First and last dates associated with an eid
(default-deserialize attributes)
Inverse of serialize
Inverse of serialize
(filters->wheres type filters)
Generates :where
clauses
Generates `:where` clauses
(find eid)
Finds an entity by eid or lookup ref Returns nil if no entity was found
Finds an entity by eid or lookup ref Returns nil if no entity was found
(find-serialize eid & [params])
Same as doing (serialize (find eid) params), which is a very common thing to do
Same as doing (serialize (find eid) params), which is a very common thing to do
(generate type & [n])
Generates n samples of a given entity type
Generates n samples of a given entity type
(generate* type)
Generates one sample of a given entity type
Generates one sample of a given entity type
(idents-with-value-type entity value-type)
Returns the idents of an entity with the given valueType
Returns the idents of an entity with the given valueType
(query type & [filters])
Performs a high-level query.
Accepts optional wheres
clauses
Performs a high-level query. Accepts optional `wheres` clauses
(register-type! kw & [m])
Registers an entity type Example: (register-entity-type! :user)
Registers an entity type Example: (register-entity-type! :user)
(serialize entity & [options])
Transforms an entity into a stripped map, suitable for sending to the outside
Transforms an entity into a stripped map, suitable for sending to the outside
(spec! entity)
Checks that an entity complies with its spec
Checks that an entity complies with its spec
(transaction->entity tx tempid)
Returns an entity from a transaction
Returns an entity from a transaction
(type-properties type)
Returns the functions of an entity type
Returns the functions of an entity type
(update {:keys [id] :as attrs})
Updates an entity from unqualified attributes.
Example usage:
(update {:id 1234567 :name Other name
})
Updates an entity from unqualified attributes. Example usage: (update {:id 1234567 :name `Other name`})
(update* {:db/keys [id] :as attrs} & {:keys [append?]})
Updates an entity.
Example usage:
(update* {:db/id 1234567
:user/first-name Other name
})
Updates an entity. Example usage: (update* {:db/id 1234567 :user/first-name `Other name`})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close