workflo.macros.specs.types/entity-ref-from-description
function to recreate entity-ref
specs from descriptions
created using s/describe
.entity-refs
when dealing with entity-ref
specs that are
combined with other specs in an s/and
.workflo.macros.specs.types/entity-ref
to be used inside
s/and
specs by improving the spec parser.::indexed
type hint to the :workflo/id
spec,
so :workflo/id
is always indexed in databases.:workflo/id
spec to workflo.macros.specs.types
.:workflo.macros.specs.types/any
type that generates a
attributes of type bytes
in Datomic schemas.:workflo.macros.specs.types/id
spec more specific.:workflo.macros.specs.types/ref-many
to be either a
vector or a set.Object
protocol
in the defview
macro.workflo.macros.util.form/form->defn
.workflo.macros.query.om-next/disambiguate
function that
detects conflicts in queries and splits them up into multiple
non-conflicting queries. It also merges queries recursively
where possible. The result is a near minimum amount of
non-conflicting queries.defservice
.:debounced-by-data
hint for debouncing service deliveries
with the same data/payload.layout
form in defscreen
macro with a form called
`sections'.:before
and :after
hooks to defcommand
.(hints [<kw> ...])
form to defservice
. Just like the hints
forms for defentity
and defcommand
, this can be used to tag services
with arbitrary hints.:async
service hint. Data delivered to
async services is delayed by a configurable :async-delay
time (defaults
to 500ms).entity-for-data
.:db/id
in entity-for-data
, to avoid guessing
entities based on common attributes.entity-for-data
to return an entity definition instead of
an attribute. ALso make entity-for-attr
public.entity-for-data
function to guess an entity definition
from any map (typically an entity instance), based on the keys in
the map. Use memoization to make this function fast.:deliver
hooks to alter the data delivered to services.:auth-query
command hooks.defhooks
macro and use it for services and commands. This allows
an arbitrary number of hooks of every kind to be registered. A reduce
is then applied to all of them to allow all hooks to shape the data
further.(hints [<kw> ...])
form to defentity
and defcommand
. This allows
to filter entities and commands by hints, e.g. to log or forward them to
additional services.defview
.:before-emit
hook: the command context.:foo
to ...foo
. This
avoids parsing conflicts and ambiguity. It's also consistent with the
spreading syntax in JavaScript.clojure.string/starts-with?
in ClojureScript; it is broken in
PhantomJS. Use subs
and re-matches
instead.:before-emit
hook to defcommand
.entity-backrefs
documentation....
in Om Next query generation. We only want to
double-quote the ...
if we are generating code for CLJS from
CLJ (e.g. from within a macro). Otherwise, single-quoting is
sufficient.workflo.macros.query.om-next/property-query
.workflo.macros.query
. This can be
used to register reusable query fragments.:as
), e.g. [foo :example bar]
.
During parsing they are then resolved into the actual queries using
the fragment registry. The result is then spliced into the parent
query, resulting in e.g. [foo baz ruux bar]
if :example
resolves
to [baz ruux]
.resolve-<registry name>
change made in 0.2.40.defregistry
require expression for defpermission
.(auth ...)
form in entities when generating
for Clojure.auth-query
forms of defentity
and defcommand
so that they require valid, regular queries as their body,
instead of allowing arbitrary, query-generating code. The latter
breaks query bindings in other forms of defentity
and
defcommand
.resolve-<registry-name>
function (e.g. resolve-entity
)
accept symbols and keywords alike, rather than always assuming
symbols.[:user/account :db/id]
) to be used in addition to simple
keywords. This allows to express things such as "query only
the users that belong to the account with the given ID".clojure.spec.test/check
on failure. This
way we get to see what actually went wrong.[?foo]
)
in query parameter maps.defcommand*
and defentity*
by always
generating valid queries for the auth-query
form.auth-query
body is a valid query in
defcommand
and defentity
.defpermission
macro to define permission with names, titles
and optional descriptions.BROKEN RELEASE.
defcommand
queries and auth queries.
The previous approach introduced in 0.2.35 threw an error when the
command data was not sequential. The new approach puts the command
data into a map under the :data
key if it isn't already a map,
so that queries can bind to it via ?data
.auth
and auth-query
forms to the defcommand
macro. These
forms are omitted when generating for ClojureScript; this follows the
assumption that authorization will be performed server-side and that
there is no interest in leaking authorization logic into client code.:auth-query
hook to the defcommand
configuration.auth-query
form to the defentity
macro. This form is omitted
when generating for ClojureScript.authorized?
function for entities. This function can check
whether, given an entity definition, env, entity ID and viewer ID,
the viewer is authorized to access the entity, according to the
implementation of the auth
form.run-command!
k.auth
form of defentity
to be aligned with the same form in defcommand
.:auth-query
hook for defentity
.defcommand
and defentity
- first
spec
, then auth-query
, then auth
.authenticate
function for entities. This is replaced by
the more aptly named and freshly implemented authorized?
function.:workflo.macros.specs.types/non-persistent
hint for entity
attributes. This hint can be added to the specs of entity attributes
in order to indicate that these attributes are not to be persisted.non-persistent-key?
and non-persistent-keys
functions to
check whether a keyword corresponds to a non-persistent entity
attribute and to obtain all non-persistent keys for an entity.workflo.macros.bind
.:default-params
to the Bidi-based screen router.backref-attr?
and singular-backref-attr?
helpers to
identify backrefs in queries.defregistry
to allow reacting to
registration and unregistration events.entity-refs
and entity-backrefs
to access
the refs and backrefs of entities by entity name.matching-entity-schema
take a map of registered
entities rather than calling registered-entities
inside the
function. This makes it more pure and allows to use the
workflo.macros.entity.schema
namespace to be used in
workflo.macros.entity
.ui/foo
or foo/baz
will be bound to foo
and baz
, respectively.foo.bar
, foo.bar/baz
.foo.bar
to bar
in the binding
utilities that we use to bind query results.:process-output
hook to defservice
to allow
further processing of the data returned by services from
their process
implementations.(replay? <bool>)
form to defservice
. This can be
used in command/event sourced systems to mark services to be
skipped when replaying commands/events.context
parameter to run-commands!
,
deliver-to-services!
and deliver-to-service-component!
that is then passed on to the :query
and :process-emit
hooks as well as the process
implementation of services.:db/id
in a view in the
screen-based example app.merge-schemas
function to merge DataScript schemas
and detect conflicting attribute schemas.:refer-macros
.merge-schemas
function to merge Datomic schemas.:refer
instead of :refer-macros
in ClojureScript
wherever we can.camelize-keys
in workflo.macros.jscomponents
.camelize-keys
function to recursively convert keys in
a map to camel-case.defjscomponents
, so the keys in props are converted
to camel-case using camelize-keys
before they are passed to
the JS components.entity-refs
spec that can be used to define entities
or entity keys that refer to one or many instances of another
entity.entity-refs
function to extract references of an entity
to other entities.keys
and optional-keys
functions to obtain all keys
and only the optional keys of an entity.val-after
function into workflo.macros.util.misc
.:cmd-params
to :cmd-data
in Om Next mutation
payload generated by the default :run-command
hook for
defview
.with-query-bindings
macro to automatically and deeply
destructure query results with the help of the query they
correspond to. Use this to wrap all function forms in defview
,
defcommand
and defservice
in order to bind as many parts
of the query results to short names from the query itself as
possible.via
boot docs`.boot production
task to be able to test examples with
CLJS advanced optimizations.:as
).with-destructured-query
macro.defjscomponents
resolves JS components to make it
work with advanced optimizations.workflo.macros.util.string/camel->kebab
when processing non-camel-case strings.(spec ...)
form to defentity
.workflo.macros.specs.types
.workflo.macros.specs.types
.workflo.macros.entity.schema
.workflo.macros.entity.datomic
.workflo.macros.entity.datascript
.(validation ...)
form in defentity
.(schema ...)
form in defentity
.workflo.macros.config
and
workflo.macros.registry
.:workflo.macros.specs.view/view-form-args
spec to always generate valid view form arguments.defview
now takes an optional (commands [cmd ...])
form
to make arbitrary external commands available in each view
function; it comes with a :run-command
hook that allows
to handle these commands; this can then be used to transact
Om Next mutations or call arbitrary functions.(defcommand ... [<query> <spec>] ...)
were changed
to (defcommand ... (query ...) (spec ...))
forms.:process-result
hook of defcommand
has been renamed
to :process-emit
and the implementation form of defcommand
has been moved into (emit <implementation>)
.defentity
macro for bundle system entities with
schemas/validation specs and authorization.defscreen
macro for defining screens of ClojureScript
apps with URL patterns, navigation information and views
for different layout segments.screen-app.html
).defservice
macro to define services that can be used to
consume and process data emitted from commands written with
defcommand
. defservice
generates a com.stuartsierra.component
component for each service to allow straight forward integration
of services written with defservice
into systems built using
org.danielsz/system
.{[current-user _] [db [id] user [name email]]}
.:join-source
key that holds either a regular parsed property
or a parsed link property. One example:
{:name current-user :type :join :join-source {:name current-user :type :link :link-id _} :join-target [{:name db/id :type :property} {:name user/name :type :property}]}
.::map-destructuring-keys
spec now works.workflo.macros.query.bind/var?
workflo.macros.query.bind/path?
workflo.macros.query.bind/denamespace
workflo.macros.query.bind/denamespace-keys
workflo.macros.query.bind/resolve-var
workflo.macros.query.bind/resolve-path
workflo.macros.query.bind/resolve
workflo.macros.query/bind-query-parameters
.{param/name [?foo ?bar]}
in addition to {param/name ?var}
.:workflo.macros.command.util/unqualified-symbol
- spec
for a symbol without a namespace component.:workflo.macros.specs.query/query
- the data format for
queries as used in the defview
macro.:workflo.macros.specs.conforming-query/query
- the data
format resulting from parsing queries with
clojure.spec/conform
.:workflo.macros.specs.parsed-query/query
- the data format
generated by parsing queries with workflo.macros.query/parse
.:workflo.macros.specs.om-query/query
- the data format for
Om Next queries, as generated by workflo.macros.query/om-query
.workflo.macros.query.util/combine-properties-and-groups
workflo.macros.query.util/capitalized-name
workflo.macros.query.util/capitalized-symbol?
workflo.macros.query.util/one-item?
workflo.macros.query/conform
workflo.macros.query/conform-and-parse
workflo.macros.query/parse-subquery
workflo.macros.query/parse
workflo.macros.query/map-destructuring-keys
workflo.macros.query.om-next/property-query
workflo.macros.query.om-next/query
workflo.macros.view/defview*
workflo.macros.command.util/bind-query-keys
workflo.macros.command.util/unqualify
workflo.macros.command.util/prefix-form-name
workflo.macros.command/defcommand*
workflo.macros.command.util/form->defn
workflo.macros.query.util/combine-properties-and-groups
workflo.macros.query.util/capitalized-name
workflo.macros.query.util/capitalized-symbol?
workflo.macros.query.util/print-spec-gen
workflo.macros.query/parse-prop
workflo.macros.command.util/bind-query-keys
workflo.macros.command.util/unqualify
workflo.macros.command.util/prefix-form-name
workflo.macros.command/defcommand*
workflo.macros.command.util/form->defn
workflo.macros.query/map-destructuring-keys
function for
generating keys for destructuring properties from queries,
replacing map-keys
.workflo.macros.query.om-next/property-query
function to
replace workflo.macros.query/om-property-query
.test-once
for running the test suites once.defview
configuration atom once at load time.workflo.macros.props
namespace renamed to workflo.macros.query
workflo.macros.props/map-keys
(replaced with
workflo.macros.query/map-destructuring-keys
)workflo.macros.props/pad-by
workflo.macros.props/property-name
workflo.macros.props/property-type
workflo.macros.props/property-query
(replaced with
workflo.macros.query.om-next/property-query
)workflo.macros.props/value?
This changelog loosely follows the guidelines discussed on Keep a CHANGELOG.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close