(attributes-by-schema-kv entity k v)
Returns the attributes of an entity whose schema matches the given value for the k attribute
Returns the attributes of an entity whose schema matches the given value for the k attribute
(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
(deserialize type data)
The inverse of serialize
The inverse of serialize
(filters->wheres type filters)
Generates :where
clauses
Generates `:where` clauses
(find eid)
Finds an entity by ref (see ::ref spec) Returns nil if no entity was found
Finds an entity by ref (see ::ref spec) Returns nil if no entity was found
(find-serialize eid & [params])
Shortcut for (serialize (find eid) params)
Shortcut for (serialize (find eid) params)
(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 v)
Returns the idents of an entity with the given valueType
Returns the idents of an entity with the given valueType
(mass-delete type)
Deletes all entities of the given type
Deletes all entities of the given type
(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 properties of an entity type
Returns the properties 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* attrs & opts)
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