Liking cljdoc? Tell your friends :D

hara.data.pipeline.mask


process-maskclj

(process-mask smask tdata nsv interim tsch datasource)

Determines correct output given data and mask

(mask/process-mask {:name :checked} {:name "Chris" :age 10} [:account] {} (-> (schema/schema examples/account-name-age-sex) :tree :person) {}) => {:age 10}

Determines correct output given data and mask

(mask/process-mask {:name :checked}
                   {:name "Chris" :age 10}
                   [:account]
                   {}
                   (-> (schema/schema examples/account-name-age-sex)
                        :tree
                        :person)
                   {})
=> {:age 10}
raw docstring

wrap-model-post-maskclj

(wrap-model-post-mask f)

Masks data in pipeline post transforms

(pipeline/normalise {:account/name "Chris"} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:post-mask {:account {:name :checked}}}} {:normalise [mask/wrap-model-post-mask]}) => {:account {}}

Masks data in pipeline post transforms 

(pipeline/normalise {:account/name "Chris"}
                     {:schema (schema/schema examples/account-name-age-sex)
                      :pipeline {:post-mask {:account {:name :checked}}}}
                     {:normalise  [mask/wrap-model-post-mask]})
=> {:account {}}
raw docstring

wrap-model-pre-maskclj

(wrap-model-pre-mask f)

Masks data across elements and schema

(pipeline/normalise {:account/age 10} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:pre-mask {:account :checked}}} wrappers) => {}

(pipeline/normalise {:account/orders #{{:number 1 :items {:name "one"}} {:number 2 :items {:name "two"}}}} {:schema (schema/schema examples/account-orders-items-image) :pipeline {:pre-mask {:account {:orders {:number :checked}}}}} wrappers) => {:account {:orders #{{:items {:name "one"}} {:items {:name "two"}}}}}

Masks data across elements and schema

(pipeline/normalise {:account/age 10}
                    {:schema (schema/schema examples/account-name-age-sex)
                     :pipeline {:pre-mask {:account :checked}}}
                    *wrappers*)
=> {}

  (pipeline/normalise {:account/orders #{{:number 1 :items {:name "one"}}
                                        {:number 2 :items {:name "two"}}}}
            {:schema (schema/schema examples/account-orders-items-image)
             :pipeline {:pre-mask {:account {:orders {:number :checked}}}}}
            *wrappers*)
=> {:account {:orders #{{:items {:name "one"}}
                        {:items {:name "two"}}}}}

raw docstring

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

× close