Liking cljdoc? Tell your friends :D

adl-support.utils

Application Description Language support - utility functions.

Application Description Language support - utility functions.
raw docstring

*locale*clj

The locale for which files will be generated.

The locale for which files will be generated.
sourceraw docstring

*output-path*clj

The path to which generated files will be written.

The path to which generated files will be written.
sourceraw docstring

*verbosity*clj

The verbosity of output from the generator.

The verbosity of output from the generator.
sourceraw docstring

all-propertiescljmacro

(all-properties entity)

Return all properties of this entity (including key properties).

Return all properties of this `entity` (including key properties).
sourceraw docstring

attributesclj

(attributes element)
(attributes element predicate)

Return the attributes of this element; if predicate is passed, return only those attributes satisfying the predicate.

Return the attributes of this `element`; if `predicate` is passed, return only those
attributes satisfying the predicate.
sourceraw docstring

base-typeclj

(base-type property application)
source

capitaliseclj

(capitalise s)

Return a string like s but with each token capitalised.

Return a string like `s` but with each token capitalised.
sourceraw docstring

childclj

(child element predicate)

Return the first child of this element satisfying this predicate.

Return the first child of this `element` satisfying this `predicate`.
sourceraw docstring

child-with-tagclj

(child-with-tag element tag)
(child-with-tag element tag predicate)

Return the first child of this element which has this tag; if element is nil, return nil. If predicate is supplied, return only the first child with the specified tag which satisfies the predicate.

Return the first child of this `element` which has this `tag`;
if `element` is `nil`, return `nil`. If `predicate` is supplied,
return only the first child with the specified `tag` which satisfies
the `predicate`.
sourceraw docstring

childrenclj

(children element)
(children element predicate)

Return the children of this element; if predicate is passed, return only those children satisfying the predicate.

Return the children of this `element`; if `predicate` is passed, return only those
children satisfying the predicate.
sourceraw docstring

children-with-tagclj

(children-with-tag element tag)
(children-with-tag element tag predicate)

Return all children of this element which have this tag; if element is nil, return nil. If predicate is supplied, return only those children with the specified tag which satisfy the predicate.

Return all children of this `element` which have this `tag`;
if `element` is `nil`, return `nil`. If `predicate` is supplied,
return only those children with the specified `tag` which satisfy
the `predicate`.
sourceraw docstring

column-nameclj

(column-name property)

Return, as a string, the name for the column which represents this property.

Return, as a string, the name for the column which represents this `property`.
sourceraw docstring

descendant-with-tagclj

(descendant-with-tag element tag)
(descendant-with-tag element tag predicate)

Return the first descendant of this element, recursively, which has this tag. If predicate is specified, return the first also satisfying this predicate.

Return the first descendant of this `element`, recursively, which has this `tag`.
If `predicate` is specified, return the first also satisfying this `predicate`.
sourceraw docstring

descendants-with-tagclj

(descendants-with-tag element tag)
(descendants-with-tag element tag predicate)

Return all descendants of this element, recursively, which have this tag. If predicate is specified, return only those also satisfying this predicate.

Return all descendants of this `element`, recursively, which have this `tag`.
If `predicate` is specified, return only those also satisfying this `predicate`.
sourceraw docstring

distinct-propertiesclj

(distinct-properties entity)
source

editor-nameclj

(editor-name entity application)

Return the path-part of the editor form for this entity. Note: assumes the editor form is the first form listed for the entity.

Return the path-part of the editor form for this `entity`. Note:
assumes the editor form is the first form listed for the entity.
sourceraw docstring

element?clj

(element? o)

True if o is a Clojure representation of an XML element.

True if `o` is a Clojure representation of an XML element.
sourceraw docstring

emit-headerclj

(emit-header prefix & content)

Emit this content as a sequence of wrapped lines each prefixed with prefix, and the whole delimited by rules.

Emit this `content` as a sequence of wrapped lines each prefixed with
`prefix`, and the whole delimited by rules.
sourceraw docstring

entity-for-propertyclj

(entity-for-property property application)

If this property references an entity, return that entity from this application

If this `property` references an entity, return that entity from this `application`
sourceraw docstring

entity?clj

(entity? x)

Return true if x is an ADL entity.

Return true if `x` is an ADL entity.
sourceraw docstring

find-permissionsclj

(find-permissions & elements)

Return appropriate the permissions of the first of these elements which has permissions.

Return appropriate the permissions of the first of these `elements` which
has permissions.
sourceraw docstring

formal-primary-key?clj

(formal-primary-key? prop-or-name entity)

Does this prop-or-name appear to be a property (or the name of a property) which is a formal primary key of this entity?

Does this `prop-or-name` appear to be a property (or the name of a property)
which is a formal primary key of this entity?
sourceraw docstring

has-non-key-properties?clj

(has-non-key-properties? entity)
source

has-primary-key?clj

(has-primary-key? entity)
source

insertable-key-propertiescljmacro

(insertable-key-properties entity)
source

insertable-propertiescljmacro

(insertable-properties entity)

Return all the properties of this entity (including key properties) into which user-supplied data can be inserted

Return all the properties of this `entity` (including key properties) into
which user-supplied data can be inserted
sourceraw docstring

insertable?clj

(insertable? property)

Return true it the value of this property may be set from user-supplied data.

Return `true` it the value of this `property` may be set from user-supplied data.
sourceraw docstring

is-quotable-type?clj

(is-quotable-type? property application)

True if the value for this field should be quoted.

True if the value for this field should be quoted.
sourceraw docstring

key-namesclj

(key-names entity)
(key-names entity as-keywords?)
source

key-propertiescljmacro

(key-properties entity)
source

(link-related-query-name property nearside farside)

link is tricky. If there's exactly than one link between the two entities, we need to generate the same name from both ends of the link

link is tricky. If there's exactly than one link between the two
entities, we need to generate the same name from both
ends of the link
sourceraw docstring

(link-table-name e1 e2)
(link-table-name property e1 e2)

Canonical name of a link table between entity e1 and entity e2. However, there may be different links between the same two tables with different semantics; if property is specified, and if more than one property in e1 links to e2, generate a more specific link name.

Canonical name of a link table between entity `e1` and entity `e2`. However, there
may be different links between the same two tables with different semantics; if
`property` is specified, and if more than one property in `e1` links to `e2`, generate
a more specific link name.
sourceraw docstring

(link-table? entity)

Return true if this entity represents a link table.

Return true if this `entity` represents a link table.
sourceraw docstring

(list-related-query-name property nearside farside)

Return the canonical name of the HugSQL query to return all records on farside which match a given record on nearside, where nearide and farside are both entities.

Return the canonical name of the HugSQL query to return all records on
`farside` which match a given record on `nearside`, where `nearide` and
`farside` are both entities.
sourceraw docstring

path-partclj

(path-part form entity application)

Return the URL path part for this form of this entity within this application. Note that form may be a Clojure XML representation of a form, list or page ADL element, or may be one of the keywords :form, :list, :page in which case the first child of the entity of the specified type will be used.

Return the URL path part for this `form` of this `entity` within this `application`.
Note that `form` may be a Clojure XML representation of a `form`, `list` or `page`
ADL element, or may be one of the keywords `:form`, `:list`, `:page` in which case the
first child of the `entity` of the specified type will be used.
sourceraw docstring

permission-groupsclj

(permission-groups permissions predicate)

Return a list of names of groups to which this predicate is true of some permission taken from these permissions, else nil.

Return a list of names of groups to which this `predicate` is true of
some permission taken from these `permissions`, else nil.
sourceraw docstring

pretty-nameclj

(pretty-name element)

Return a version of the name of this element (entity, field, form, list, page, property) suitable for use in text visible to the user.

Return a version of the name of this `element` (entity, field,
form, list, page, property) suitable for use in text visible to the user.
sourceraw docstring

promptclj

(prompt field-or-property form entity application)

Return an appropriate prompt for the given field-or-property taken from this form of this entity of this application, in the context of the current binding of *locale*. TODO: something more sophisticated about i18n

Return an appropriate prompt for the given `field-or-property` taken from this
`form` of this `entity` of this `application`, in the context of the current
binding of `*locale*`. TODO: something more sophisticated about i18n
sourceraw docstring

propertiescljmacro

(properties entity)

Return all the properties of this entity.

Return all the properties of this `entity`.
sourceraw docstring

property-for-fieldclj

(property-for-field field entity)

Return the property within this entity which matches this field.

Return the property within this `entity` which matches this `field`.
sourceraw docstring

property?clj

(property? o)

True if o is a property.

True if `o` is a property.
sourceraw docstring

required-propertiesclj

(required-properties entity)

Return the properties of this entity which are required and are not system generated.

Return the properties of this `entity` which are required and are not
system generated.
sourceraw docstring

safe-nameclj

(safe-name o)
(safe-name o convention)

Return a safe name for the object o, given the specified convention. o is expected to be either a string or an element. Recognised values for convention are: #{:c :c-sharp :java :sql}

Return a safe name for the object `o`, given the specified `convention`.
`o` is expected to be either a string or an element. Recognised values for
`convention` are: #{:c :c-sharp :java :sql}
sourceraw docstring

singulariseclj

(singularise string)

Attempt to construct an idiomatic English-language singular of this string.

Attempt to construct an idiomatic English-language singular of this string.
sourceraw docstring

sort-by-nameclj

(sort-by-name elements)

Sort these elements by their :name attribute.

Sort these `elements` by their `:name` attribute.
sourceraw docstring

system-generated?clj

(system-generated? property)

True if the value of the property is system generated, and should not be set by the user.

True if the value of the `property` is system generated, and
should not be set by the user.
sourceraw docstring

type-for-definedclj

(type-for-defined property application)
source

typedefclj

(typedef property application)

If this property is of type defined, return its type definition from this application, else nil.

If this `property` is of type `defined`, return its type definition from
this `application`, else nil.
sourceraw docstring

unique-link?clj

(unique-link? e1 e2)

True if there is exactly one link between entities e1 and e2.

True if there is exactly one link between entities `e1` and `e2`.
sourceraw docstring

user-distinct-propertiesclj

(user-distinct-properties entity)

Return the properties of this entity which are user distinct

Return the properties of this `entity` which are user distinct
sourceraw docstring

user-distinct-property-namesclj

(user-distinct-property-names entity)

Return, as a set, the names of properties which are user distinct

Return, as a set, the names of properties which are user distinct
sourceraw docstring

visible-toclj

(visible-to permissions)

Return a list of names of groups to which are granted read access, given these permissions, else nil.

Return a list of names of groups to which are granted read access,
given these `permissions`, else nil.
sourceraw docstring

volatilityclj

(volatility entity)

Return the cache ttl in seconds for records of this entity.

Return the cache ttl in seconds for records of this `entity`.
sourceraw docstring

wrap-linesclj

(wrap-lines text)
(wrap-lines width text)

Wrap lines in this text to this width; return a list of lines.

Wrap lines in this `text` to this `width`; return a list of lines.
sourceraw docstring

writeable-byclj

(writeable-by permissions)
(writeable-by permissions has-value?)

Return a list of names of groups to which are granted write access, given these permissions, else nil. TODO: TOTHINKABOUT: properties are also writeable by insert and noedit, but only if the current value is nil.

Return a list of names of groups to which are granted write access,
given these `permissions`, else nil.
TODO: TOTHINKABOUT: properties are also writeable by `insert` and `noedit`, but only if the
current value is nil.
sourceraw docstring

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

× close