imcljs.query

->xml

(->xml model query)
Returns the stringfied XML representation of an EDN intermine query.

add-id

(add-id s)

deconstruct-by-class

(deconstruct-by-class model query)
Deconstructs a query by its views and groups them by class.
(deconstruct-by-class model query)
{:Gene {Gene.homologues.homologue {:from Gene :select [Gene.homologues.homologue.id] :where [...]}
       {Gene {:from Gene :select [Gene.id] :where [...]}}}
Make sure to add :type-constraints to the model if the path traverses a subclass
(see docstring of `imcljs.path/walk` for more information).

enforce-constraints-have-class

(enforce-constraints-have-class query)

enforce-constraints-have-code

(enforce-constraints-have-code query)

enforce-constraints-loop-as-value

(enforce-constraints-loop-as-value query)

enforce-constraints-valueless

(enforce-constraints-valueless query)
IS NULL and IS NOT NULL constraints shouldn't have a value.

enforce-joins-have-class

(enforce-joins-have-class query)

enforce-origin

(enforce-origin query)

enforce-sort-order

(enforce-sort-order query)
Makes sure the query XML will have a sortOrder attribute instead of orderBy.
Only the former is supported as part of the PathQuery API.

enforce-sorting

(enforce-sorting query)

enforce-views-have-class

(enforce-views-have-class query)

escape-attribute

(escape-attribute s)
Replace double quotation mark, angle brackets and ampersand characters with
their HTML entity, as these are not permitted in XML attribute values.

group-views-by-class

(group-views-by-class model query)
Group the views of a query by their Class and provide a query
to retrieve just that column of data.
Make sure to add :type-constraints to the model if the path traverses a subclass
(see docstring of `imcljs.path/walk` for more information).

html-entities

ids->constraint

(ids->constraint c)

make-join

(make-join join-path)

map->xmlstr

(map->xmlstr elem m)
xml string representation of an edn map.
(map->xlmstr constraint {:key1 val1 key2 val2}) => <constraint key1=val1 key2=val2 />

rename-key

(rename-key m old-k new-k)

sterilize-query

stringify-map

(stringify-map m)

value

(value x)