March Docs

Depot.Embed

depot/lib/depot_embed.march Embedded schemas — nested records that live inside a parent row and are serialised as an assoc-list blob (JSONB-compatible shape: a flat map of field->value strings).

Operations: put_embed/3 — set or replace one field in an embed get_embed/2 — look up a field (Option) apply_changes/2 — fold a list of (field, value) changes over an embed merge/2 — right-biased merge of two embeds

Serialisation uses a minimal k1=v1;k2=v2; shape that preserves key order and round-trips cleanly. It is not full JSON — the values must not contain '=' or ';'. For full JSON, plug in a dedicated encoder on top of these primitives.

Types

typeEmbedEmbed = Embed(List((String, String)))#

Functions

fnapply_changesapply_changes(e, changes)#
fnemptyempty()#
fnget_embedget_embed(e, field)#
fnmergemerge(a, b)#
fnput_embedput_embed(e, field, value)#