Liking cljdoc? Tell your friends :D

fx.entity


->entity-refclj

(->entity-ref entity)

Returns the ref name for given entity name e.g. :my-cool/entity -> :my-cool/entity-ref

Returns the ref name for given entity name e.g.
:my-cool/entity -> :my-cool/entity-ref
raw 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
raw docstring

->ref-spec-typeclj

(->ref-spec-type entity)

create-entityclj

(create-entity entity config)

Constructor function for entities

Constructor function for entities
raw 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
raw 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
raw docstring

entity-columnsclj

(entity-columns entity)

Return a list of entity fields names (keywords)

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

entity-entriesclj

(entity-entries entity)

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

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

entity-entry-schema?clj


entity-key->entity-nameclj

(entity-key->entity-name entity-key)

entity-raw-spec?clj


entity-spec?clj


entity-valuesclj

(entity-values entity data)

Extract entity columns data. map -> table e.g. {:id 1 :name 'Jack'} -> [1 'Jack']

Extract entity columns data.
map -> table e.g.
{:id 1 :name 'Jack'} -> [1 'Jack']
raw docstring

entity?clj


EntityRawSpecclj

Recursive malli schema to parse provided by user entities schemas e.g. [:spec {:table "client"} [:id {:primary-key? 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 {:primary-key? true} uuid?]
  [:name [:string {:max 250}]]
  [:user {:one-to-many? true} :fx.entity-test/user]]
raw 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
raw docstring

entry-schemaclj

(entry-schema entry-schema)

Get the simplified definition of the field spec

Get the simplified definition of the field spec
raw docstring

entry-schema-tableclj

(entry-schema-table entry-schema)

Get table name from field spec

Get table name from field spec
raw docstring

optional-ref?clj

(optional-ref? props)

Check if some reference field is optional

Check if some reference field is optional
raw docstring

optional-rel-typesclj


PEntitycljprotocol

create!clj

(create! _ params)

delete!clj

(delete! _)

find!clj

(find! _)

find-all!clj

(find-all! _)

update!clj

(update! _)

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

primary-key-schemaclj

(primary-key-schema entity)

Get the spec of a field which is marked as primary key

Get the spec of a field which is marked as primary key
raw docstring

propertiesclj

(properties schema)

Get the schema properties map if presented

Get the schema properties map if presented
raw docstring

ref?clj

(ref? type)

Check if type is a reference to another entity

Check if type is a reference to another entity
raw docstring

register-entity!clj

(register-entity! entity schema)

Adds entity and its reference schemas to the global registry

Adds entity and its reference schemas to the global registry
raw docstring

register-entity-ref!clj

(register-entity-ref! entity schema)

Adds the entity ref schema to the global registry

Adds the entity ref schema to the global registry
raw docstring

registry*clj

Atom to hold malli schemas

Atom to hold malli schemas
raw docstring

required-rel-typesclj


schema-typeclj

(schema-type schema)

Get the schema type

Get the schema type
raw docstring

schema?clj


val-schema?clj


valid-entity?clj

(valid-entity? entity data)

Check if data is aligned with entity spec

Check if data is aligned with entity spec
raw docstring

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

× close