Skip to main content

Module write_mode

Module write_mode 

Source
Expand description

Unified write-mode types + planner shared by every upsert-capable sink.

Structs§

DeleteMarker
Identifies a record as a delete (vs. an upsert) by a marker field’s value. e.g. { field: "__op", values: ["d", "delete"] }.
KeyTuple
Ordered key column → value pairs, in key declaration order.
WritePlan
The partition of a page by write mode. Infallible to build — per-row failures (missing/null key) land in failed with their original page index so the caller can route them to a DLQ or abort.
WriteSpec
Shared write-mode config, embedded in each upsert-capable sink config via #[serde(flatten)] so write_mode / key / delete_marker appear at the sink-config top level.

Enums§

WriteMode
Write semantics for a sink. Serialized snake_case. Default Append.

Functions§

key_to_doc_id
Render a key tuple into a single document id (Elasticsearch _id).
key_to_filter
Build a Mongo/ES filter document { col: value, … } from a key tuple.
plan_writes
Partition page into upserts + deletes per spec. The single place all six sinks share. WriteMode::Append should never reach here (callers route append separately); if it does, every row is treated as an upsert.