Liking cljdoc? Tell your friends :D

fx.entity


->entity-refclj

(->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
sourceraw docstring

->entity-ref-schemaclj

(->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
sourceraw docstring

->ref-spec-typeclj

(->ref-spec-type entity rel-type)
source

castclj

(cast entity data)

Cast data fields according to entity schema

Cast data fields according to entity schema
sourceraw docstring

create-entityclj

(create-entity entity-type spec)

Constructor function for entities

Constructor function for entities
sourceraw docstring

depends-on?clj

(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
sourceraw docstring

entities-registryclj

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
sourceraw docstring

entity-columnsclj

(entity-columns entity)

Return a list of entity fields names (keywords)

Return a list of entity fields names (keywords)
sourceraw docstring

entity-fieldclj

(entity-field entity field-key)

Return a field spec (map-entries)

Return a field spec (map-entries)
sourceraw docstring

entity-field-propclj

(entity-field-prop entity field-key prop-key)

Get field property value of the given entity

Get field property value of the given entity
sourceraw docstring

entity-field-schema?clj

source

entity-fieldsclj

(entity-fields entity)

Return a list of entity fields specs (map-entries)

Return a list of entity fields specs (map-entries)
sourceraw docstring

entity-propertiesclj

(entity-properties entity)

Get schema properties map if presented from entity record

Get schema properties map if presented from entity record
sourceraw docstring

entity-raw-spec?clj

source

entity-ref-schemaclj

source

entity-spec?clj

source

entity?clj

source

EntityRawSpecclj

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]]
sourceraw docstring

EntitySpecclj

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
sourceraw docstring

field-propclj

(field-prop field-schema prop-key)

Get field property value

Get field property value
sourceraw docstring

field-schemaclj

(field-schema field-schema)

Get the simplified definition of the field spec

Get the simplified definition of the field spec
sourceraw docstring

field-schema?clj

source

field-type-propclj

(field-type-prop field-schema prop-key)

Get any field type property value

Get any field type property value
sourceraw docstring

ident-field-schemaclj

(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
sourceraw docstring

optional-ref?clj

(optional-ref? props)

Check if reference field is optional

Check if reference field is optional
sourceraw docstring

optional-rel-typesclj

source

prepare-specclj

(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
sourceraw docstring

propclj

(prop entity prop-key)

Get entity property under specified key

Get entity property under specified key
sourceraw docstring

propertiesclj

(properties schema)

Get schema properties map if presented

Get schema properties map if presented
sourceraw docstring

ref-entity-propclj

(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
sourceraw docstring

ref-field-schemaclj

(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
sourceraw docstring

ref?clj

(ref? val-schema)

Check if type is a reference to another entity

Check if type is a reference to another entity
sourceraw docstring

register-entity!clj

(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
sourceraw docstring

register-entity-ref!clj

(register-entity-ref! entity-type schema)

Adds the entity ref schema to the global registry

Adds the entity ref schema to the global registry
sourceraw docstring

registry*clj

Atom to hold malli schemas

Atom to hold malli schemas
sourceraw docstring

required-ref?clj

(required-ref? props)

Check if reference field is required

Check if reference field is required
sourceraw docstring

required-rel-typesclj

source

schema-typeclj

(schema-type schema)

Get the schema type

Get the schema type
sourceraw docstring

schema?clj

source

sequential-relationsclj

source

string->identityclj

(string->identity ref x)
source

valid-entity?clj

(valid-entity? entity data)

Check if data is aligned with entity spec

Check if data is aligned with entity spec
sourceraw docstring

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

× close