Liking cljdoc? Tell your friends :D

adl-support.core


do-or-log-errormacro

(do-or-log-error
  form
  &
  {:keys [message error-return],
   :or {message (clojure.core/seq
                  (clojure.core/concat
                    (clojure.core/list (quote clojure.core/str))
                    (clojure.core/list "A failure occurred in ")
                    (clojure.core/list (list (quote quote) form))))}})

Evaluate the supplied form in a try/catch block. If the keyword param :message is supplied, the value will be used as the log message; if the keyword param :error-return is supplied, the value will be returned if an exception is caught.

Evaluate the supplied `form` in a try/catch block. If the
keyword param `:message` is supplied, the value will be used
as the log message; if the keyword param `:error-return` is
supplied, the value will be returned if an exception is caught.
raw docstring

massage-params

(massage-params params form-params key-fields)

Sending empty strings, or numbers as strings, to the database often isn't helpful. Massage these params and form-params to eliminate these problems. We must take key field values out of just params, but we should take all other values out of form-params - because we need the key to load the form in the first place, but just accepting values of other params would allow spoofing.

Sending empty strings, or numbers as strings, to the database often isn't
helpful. Massage these `params` and `form-params` to eliminate these problems.
We must take key field values out of just params, but we should take all other
values out of form-params - because we need the key to load the form in
the first place, but just accepting values of other params would allow spoofing.
raw docstring

massage-value

(massage-value k m)

query-string-to-map

(query-string-to-map query-string)

A query-string - the query-part of a URL - comprises generally <name>=<value>&<name>=<value>...; reduce such a string to a map. If query-string is nil or empty return an empty map.

A `query-string` - the query-part of a URL - comprises generally
`<name>=<value>&<name>=<value>...`; reduce such a string to a map.
If `query-string` is nil or empty return an empty map.
raw docstring

raw-resolve-template

(raw-resolve-template n)

resolve-template

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

× close