vl-data-insert.core

append-and-replace

(append-and-replace struct {t :Type, v :Value, u :Unit, n :N, s :SdValue})
Append `:Value`, `:SdValue` and `:N` if present. Relaces `:Type` and
`:Unit`.

fit-in-struct

(fit-in-struct s m)
Fits `m` into the given structure `s`. Function looks up the
`:Type` of `m`. If a structure with the same `:Type` exist
[[append-and-replace]] is called.

store-result

(store-result doc m p)
Stores the result map `m` in the given `doc`ument under `p`ath. If
`m` contains `:Type` and `:Value` `m` is [[fit-in-struct]] and the
structure `s` is assumed to be a `vector`. Other cases (e.g. merge
in `:AuxValues`) are straight
forward (see [[vl-data-insert/test/cmp/doc_test.clj]] for details).

store-results

(store-results doc res path)
Takes a vector of maps. Calls `store-result` on each map.

vector-vals

(vector-vals m)
Ensures that the values of `:Value`,`:SdValue` and `:N` are
vectors.