(->entity-ref entity-type)
Returns the entity ref type for given entity type e.g. :my-cool/entity -> :my-cool/entity-ref
Returns the entity ref type for given entity type e.g. :my-cool/entity -> :my-cool/entity-ref
(->entity-ref-schema schema)
Will return a simplified malli schema for a given entity Basically wil try to identify a type of primary key field
Will return a simplified malli schema for a given entity Basically wil try to identify a type of primary key field
(cast entity data)
Cast data fields according to entity schema
Cast data fields according to entity schema
(create-entity entity-type spec)
Constructor function for entities
Constructor function for entities
(depends-on? target dependency)
Check if one entity depends on the other as foreign tables in SQL
Check if one entity depends on the other as foreign tables in SQL
Mutable malli registry to hold all defined by user entities + some utility schemas
Mutable malli registry to hold all defined by user entities + some utility schemas
(entity-columns entity)
Return a list of entity fields names (keywords)
Return a list of entity fields names (keywords)
(entity-field entity field-key)
Return a field spec (map-entries)
Return a field spec (map-entries)
(entity-fields entity)
Return a list of entity fields specs (map-entries)
Return a list of entity fields specs (map-entries)
Recursive malli schema to parse provided by user entities schemas e.g. [:spec {:table "client"} [:id {:identity? true} uuid?] [:name [:string {:max 250}]] [:user {:one-to-many? true} :fx.entity-test/user]]
Recursive malli schema to parse provided by user entities schemas e.g. [:spec {:table "client"} [:id {:identity? true} uuid?] [:name [:string {:max 250}]] [:user {:one-to-many? true} :fx.entity-test/user]]
Recursive malli schema to unparse provided by user entities schemas to internal schema representation
Recursive malli schema to unparse provided by user entities schemas to internal schema representation
(field-schema field-schema)
Get the simplified definition of the field spec
Get the simplified definition of the field spec
(ident-field-schema entity)
Get the spec of a field which is marked as identity field
Get the spec of a field which is marked as identity field
(optional-ref? props)
Check if some reference field is optional
Check if some reference field is optional
(prepare-spec spec)
Transform the user defined entity spec to something more understandable for malli. Original specs will cause errors due to cress spec references
Transform the user defined entity spec to something more understandable for malli. Original specs will cause errors due to cress spec references
(prop entity prop-key)
Get the property from entity by key
Get the property from entity by key
(properties schema)
Get the schema properties map if presented
Get the schema properties map if presented
(ref-field-prop field-schema prop-key)
Get any property value from referenced field spec
Get any property value from referenced field spec
(ref-field-schema entity target-entity)
Get the field schema which is a reference to the specifyed type
Get the field schema which is a reference to the specifyed type
(ref-type-prop field-schema prop-key)
Get any field type property value
Get any field type property value
(ref? val-schema)
Check if type is a reference to another entity
Check if type is a reference to another entity
(register-entity! entity-type schema)
Adds entity and its reference schemas to the global registry
Adds entity and its reference schemas to the global registry
(register-entity-ref! entity-type schema)
Adds the entity ref schema to the global registry
Adds the entity ref schema to the global registry
(valid-entity? entity data)
Check if data is aligned with entity spec
Check if data is aligned with entity spec
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close