Liking cljdoc? Tell your friends :D

mongofinil.core

A Mongoid-like library that lets you focus on the important stuff

A Mongoid-like library that lets you focus on the important stuff
raw docstring

add-functionsclj

(add-functions ns function-defs model-hooks fn-middleware metrics-fn)

Takes a list of hashes which define functions, wraps those functions according to their specification, and interns those functions in the target namespace

Takes a list of hashes which define functions, wraps those functions
according to their specification, and interns those functions in the target
namespace
sourceraw docstring

apply-defaultsclj

(apply-defaults defaults row only)
source

apply-to-lastclj

(apply-to-last f args)
source

call-post-hooksclj

(call-post-hooks hooks returns-list rows)
source

call-post-hooks-pluralclj

(call-post-hooks-plural hooks rows)
source

call-post-hooks-singularclj

(call-post-hooks-singular hooks row)
source

call-pre-hooksclj

(call-pre-hooks hooks row)
source

canonicalize-field-defsclj

(canonicalize-field-defs {:keys [name required findable default validators
                                 keyword transient]
                          :as args})

Validate field definitions

Validate field definitions
sourceraw docstring

coerceclj

(coerce obj options)
source

coerce-idclj

(coerce-id id)
source

coerce-mapclj

(coerce-map m {:keys [keywords strings string-keys] :as options})
source

col-validatorsclj

(col-validators fields)

Returns a vector of validators from field definitions

Returns a vector of validators from field definitions
sourceraw docstring

convert-dotmap-to-nestedclj

(convert-dotmap-to-nested m)

Converts a map with dot-notated keys to a nested map

Converts a map with dot-notated keys to a nested map
sourceraw docstring

create-col-functionclj

(create-col-function collection
                     field
                     defaults
                     transients
                     use-refs
                     keywords
                     strings
                     profile-reads
                     profile-writes)
source

create-row-functionsclj

(create-row-functions collection
                      row-validators
                      field-defs
                      defaults
                      transients
                      use-refs
                      keywords
                      strings
                      profile-reads
                      profile-writes)
source

deep-merge-with-like-mongoclj

(deep-merge-with-like-mongo old_map new_map strings)

Merge new fields into an old map the same way MongoDB does. Note that although this plays nicely with dot-notated nested fields it does not play nicely with indexes at the moment

Merge new fields into an old map the same way MongoDB does.
Note that although this plays nicely with dot-notated nested fields it 
does not play nicely with indexes at the moment
sourceraw docstring

defapiclj

(defapi &args)
source

defmodelclj

(defmodel collection
          &
          {:keys [validators fields use-refs profile-reads profile-writes hooks
                  fn-middleware metrics-fn]
           :or {validators [] fields [] use-refs false hooks {}}
           :as attrs})

Define a DB model from its fields

Define a DB model from its fields
sourceraw docstring

dot-keyword-to-unnested-vectorclj

(dot-keyword-to-unnested-vector k)

Takes a dot-notated keyword and splits it into a vector of keywords

Takes a dot-notated keyword and splits it into a vector of keywords
sourceraw docstring

extract-congo-argumentclj

(extract-congo-argument args key)

Given an argument list, extract the keyword argument named 'key'

Given an argument list, extract the keyword argument named 'key'
sourceraw docstring

get-hooksclj

(get-hooks desired-phase model-hooks fn-hooks)
source

intern-fnclj

(intern-fn fn {:keys [ns name doc arglists]})

intern the function in :ns under the name :name

intern the function in :ns under the name :name
sourceraw docstring

is-dot-notated?clj

(is-dot-notated? k)

Checks if a keyword is in dot-notation

Checks if a keyword is in dot-notation
sourceraw docstring

log-messageclj

(log-message x & {:keys [sensitive]})
source

some-hooksclj

(some-hooks hooks)

Takes a seq of hooks and returns a function that is the composition of those hooks. Adds a nil-guard to each of the hooks, stops executing hooks if passed nil or when a hook in the chain returns nil. Returns nil if called with nil or if any of the hooks returns nil.

Takes a seq of hooks and returns a function that is the composition of those
hooks. Adds a nil-guard to each of the hooks, stops executing hooks if passed
nil or when a hook in the chain returns nil.
Returns nil if called with nil or if any of the hooks returns nil.
sourceraw docstring

str-takeclj

(str-take n str)
source

utcclj

source

wrap-debugclj

(wrap-debug f)

Wrap f to add default output values for the result of f

Wrap f to add default output values for the result of f
sourceraw docstring

wrap-fn-middlewareclj

(wrap-fn-middleware f middleware)
source

wrap-hooksclj

(wrap-hooks f returns-list model-hooks fn-hooks)
source

wrap-input-defaultsclj

(wrap-input-defaults f defaults)

Wrap f to add default output values for the result of f

Wrap f to add default output values for the result of f
sourceraw docstring

wrap-metricsclj

(wrap-metrics f metrics-fn ns name)
source

wrap-output-defaultsclj

(wrap-output-defaults f defaults)

Wrap f to add default output values for the result of f

Wrap f to add default output values for the result of f
sourceraw docstring

wrap-output-incomplete?clj

(wrap-output-incomplete? f)

Wrap f to add metadata about whether the returned document is incomplete

Wrap f to add metadata about whether the returned document is incomplete
sourceraw docstring

wrap-profileclj

(wrap-profile f time-in-millis ns name)
source

wrap-refsclj

(wrap-refs f input? output?)

If input? and output?, replace the first argument's value with the result. If just input?, deref the only argument. If just output?, wrap a ref around the result. Otherwise, just run normally

If input? and output?, replace the first argument's value with the result. If
just input?, deref the only argument. If just output?, wrap a ref around the
result. Otherwise, just run normally
sourceraw docstring

wrap-transientsclj

(wrap-transients f transients)

Take the last arguent and strips the transient attributes from it. Apply the DB operation, and then readdd the transient attributes to its result

Take the last arguent and strips the transient attributes from it. Apply the
DB operation, and then readdd the transient attributes to its result
sourceraw docstring

wrap-translationsclj

(wrap-translations f options)

If the result of f contains keys which are in keywords, convert them to keywords

If the result of f contains keys which are in keywords, convert them to keywords
sourceraw docstring

wrap-unwrap-single-objectclj

(wrap-unwrap-single-object f returns-list)
source

wrap-validateclj

(wrap-validate f validators)

If validators is true, run validate!

If validators is true, run validate!
sourceraw docstring

wrap-wrap-single-objectclj

(wrap-wrap-single-object f returns-list)
source

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

× close