Liking cljdoc? Tell your friends :D

datofu.schema.dsl

Exposes a concise, function-based Clojure DSL for declaring Datomic schema transactions. See the doc of #'attr for more details.

Exposes a concise, function-based Clojure DSL for declaring Datomic schema transactions.
See the doc of #'attr for more details.
raw docstring

attrclj

(attr ident & clauses)

Creates a attribute named :ident from the given DSL clauses. A clause can be:

  • a map, which will be merged into the map for the attribute (example: {:db/index true, :db/fulltext false})
  • a string, which will be added to the attribute as its :db/doc
  • a keyword, which will be interpreted specially.

The allowed keywords and their meaning are:

  • :string / :db.type/string / :boolean / :db.type/boolean / ... : sets the :db/valueType of the attribute. See http://docs.datomic.com/schema.html for the full list of value types.
  • :one / db.cardinality/one: sets :db/cardinality to :db.cardinality/one (which is the default if unspecified)
  • :many / db.cardinality/many: sets :db/cardinality to :db.cardinality/many
  • :identity / :db.unique/identity: set :db/unique to :db.unique/identity
  • :value / :db.unique/value: set :db/unique to :db.unique/value
  • :component: sets :db/isComponent to true
  • :index: sets :db/index to true
  • :fulltext: sets :db/fulltext to true
  • :noHistory: sets :db/noHistory to true

The clauses are applied in order, so a clause on the right may overrule a clause on its left.

Creates a attribute named `:ident` from the given DSL clauses.
A clause can be:
* a map, which will be merged into the map for the attribute (example: {:db/index true, :db/fulltext false})
* a string, which will be added to the attribute as its :db/doc
* a keyword, which will be interpreted specially.

The allowed keywords and their meaning are:
* :string / :db.type/string / :boolean / :db.type/boolean / ... : sets the :db/valueType of the attribute.
See http://docs.datomic.com/schema.html for the full list of value types.
* :one / db.cardinality/one: sets :db/cardinality to :db.cardinality/one (which is the default if unspecified)
* :many / db.cardinality/many: sets :db/cardinality to :db.cardinality/many
* :identity / :db.unique/identity: set :db/unique to :db.unique/identity
* :value / :db.unique/value: set :db/unique to :db.unique/value
* :component: sets :db/isComponent to true
* :index: sets :db/index to true
* :fulltext: sets :db/fulltext to true
* :noHistory: sets :db/noHistory to true

The clauses are applied in order, so a clause on the right may overrule a clause on its left.
sourceraw docstring

db-clj-fnclj

(db-clj-fn ident params code)
(db-clj-fn ident doc params code)

Shorthand for making a Clojure database function. Will require datomic.api with alias d/

Shorthand for making a Clojure database function. Will require datomic.api with alias d/
sourceraw docstring

db-fnclj

(db-fn ident config)
(db-fn ident doc config)

Shorthand for Datomic database functions. config is what should be passed to

Shorthand for Datomic database functions.
`config` is what should be passed to 
sourceraw docstring

namedclj

(named ident & clauses)

Shorthand for named entities (defined with a keyword, e.g enums)

Shorthand for named entities (defined with a keyword, e.g enums)
sourceraw docstring

partclj

(part ident & clauses)

Shorhand for creating partitions

Shorhand for creating partitions
sourceraw docstring

to-manyclj

(to-many ident & clauses)

Shorthand for a ref-typed, cardinality-many attribute

Shorthand for a ref-typed, cardinality-many attribute
sourceraw docstring

to-oneclj

(to-one ident & clauses)

Shorthand for a ref-typed, cardinality-one attribute

Shorthand for a ref-typed, cardinality-one attribute
sourceraw docstring

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

× close