(->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-field-prop entity field-key prop-key)
Get field property value of the given entity
Get field property value of the given entity
(entity-fields entity)
Return a list of entity fields specs (map-entries)
Return a list of entity fields specs (map-entries)
(entity-properties entity)
Get schema properties map if presented from entity record
Get schema properties map if presented from entity record
Recursive malli schema to parse provided by user entities schemas e.g. [:spec {:table "client"} [:id {:identity true} uuid?] [:name [:string {:max 250}]] [:user {:rel-type :one-to-many} :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 {:rel-type :one-to-many} :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-prop field-schema prop-key)
Get field property value
Get field property value
(field-schema field-schema)
Get the simplified definition of the field spec
Get the simplified definition of the field spec
(field-type-prop field-schema prop-key)
Get any field type property value
Get any field type property value
(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 reference field is optional
Check if 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 entity property under specified key
Get entity property under specified key
(properties schema)
Get schema properties map if presented
Get schema properties map if presented
(ref-entity-prop field-schema prop-key)
Get any property value from referenced entity by given ref field
Get any property value from referenced entity by given ref field
(ref-field-schema entity target-entity)
Get the field schema which is a reference to the specified type
Get the field schema which is a reference to the specified type
(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
(required-ref? props)
Check if reference field is required
Check if reference field is required
(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