Liking cljdoc? Tell your friends :D

im-tables.utils


clean-derived-querycljs

(clean-derived-query query)

New queries are sometimes derived from an existing query, to fulfill an auxilliary purpose. The InterMine backend will in some cases return 'Service failed' if a query specifies sorting for a column that isn't part of the view, or joins that isn't relevant to the results. In most cases, these properties won't have an effect on the result and can safely be removed.

New queries are sometimes derived from an existing query, to fulfill an
auxilliary purpose. The InterMine backend will in some cases return 'Service
failed' if a query specifies sorting for a column that isn't part of the
view, or joins that isn't relevant to the results. In most cases, these
properties won't have an effect on the result and can safely be removed.
sourceraw docstring

clj->jsoncljs

(clj->json x)

Converts a Clojure data structure to JSON.

Converts a Clojure data structure to JSON.
sourceraw docstring

constraints->logiccljs

(constraints->logic constraints)

Generates the default 'A and B and ...' constraint logic string from a sequence of constraints. Note that :code needs to be present on all applicable constraint maps, which imcljs.query/sterilize-query ensures.

Generates the default 'A and B and ...' constraint logic string from a
sequence of constraints. Note that `:code` needs to be present on all
applicable constraint maps, which `imcljs.query/sterilize-query` ensures.
sourceraw docstring

display-namecljs

(display-name model view)

Takes a view path and returns a human-readable name string.

Takes a view path and returns a human-readable name string.
sourceraw docstring

on-eventcljs

(on-event trigger callback)

For use with :ref attribute on elements to easily define jquery listeners. Uses some-> as the event isn't guaranteed to hold a value. Returns the event so you can chain multiple on calls by wrapping them in comp. Example: [:span.dropdown {:ref (comp (on "hide.bs.dropdown" #(js/alert "I'm closing!")) (on "show.bs.dropdown" #(js/alert "I'm opening!")))}]

For use with `:ref` attribute on elements to easily define jquery listeners.
Uses `some->` as the event isn't guaranteed to hold a value. Returns the event
so you can chain multiple `on` calls by wrapping them in `comp`. Example:
    [:span.dropdown
     {:ref (comp
             (on "hide.bs.dropdown"
                 #(js/alert "I'm closing!"))
             (on "show.bs.dropdown"
                 #(js/alert "I'm opening!")))}]
sourceraw docstring

place-below!cljs

(place-below! below above & {:keys [right? loading?]})

Call with DOM elements to set the position styling of below such that it is directly below the edge of above. right? - position below using its top right corner (instead of top left). loading? - when right? is true, we need to know the width of below to position it correctly. This arg tells us that the width might change when it's done loading, so we just guess instead.

Call with DOM elements to set the position styling of `below` such that it
is directly below the edge of `above`.
`right?` - position `below` using its top right corner (instead of top left).
`loading?` - when `right?` is true, we need to know the width of `below` to
             position it correctly. This arg tells us that the width might
             change when it's done loading, so we just guess instead.
sourceraw docstring

pretty-numbercljs

(pretty-number n)

Returns a human-readable (comma thousand-separators) number using the Google Closure formatter.

Returns a human-readable (comma thousand-separators) number using the
Google Closure formatter.
sourceraw docstring

response->errorcljs

(response->error response)

Convert an HTTP response to an error map.

Convert an HTTP response to an error map.
sourceraw docstring

rows->mapscljs

(rows->maps res)

Takes an imcljs.fetch/rows response and transforms it into a vector of maps, with the last portion of the path as keyword keys ('Gene.symbol' -> :symbol).

Takes an `imcljs.fetch/rows` response and transforms it into a vector of
maps, with the last portion of the path as keyword keys ('Gene.symbol' -> :symbol).
sourceraw docstring

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

× close