pub enum IndexWriteOp {
DeleteGsi {
table_name: String,
index_name: String,
table_pk: String,
table_sk: String,
},
InsertGsi {
table_name: String,
index_name: String,
gsi_pk: String,
gsi_sk: String,
table_pk: String,
table_sk: String,
item_json: String,
},
DeleteLsi {
table_name: String,
index_name: String,
base_pk: String,
base_sk: String,
},
InsertLsi {
table_name: String,
index_name: String,
pk: String,
sk: String,
base_pk: String,
base_sk: String,
item_json: String,
},
DeleteVector {
table_name: String,
index_name: String,
table_pk: String,
table_sk: String,
},
InsertVector {
table_name: String,
index_name: String,
row: Box<VectorItemRow>,
},
}Expand description
One index-table write operation, backend-neutral.
The per-write and per-delete GSI/LSI fan-out builds an ordered list of these
and hands it to StorageBackend::apply_index_writes in a single call. The
default impl replays each op through the matching per-item method, identical
to the per-op loop it replaces; the wasm backend overrides it to collapse the
list into one bridge crossing. Each variant’s fields mirror the argument
order of the per-item method it stands in for.
Variants§
DeleteGsi
Remove this base key’s entry from a GSI table.
InsertGsi
Insert (or replace) this item’s projected entry into a GSI table.
Fields
DeleteLsi
Remove this base key’s entry from an LSI table.
InsertLsi
Insert (or replace) this item’s projected entry into an LSI table.
Fields
DeleteVector
Remove this base key’s row from a vector index shadow table.
InsertVector
Insert (or replace) this item’s derived row into a vector index shadow
table. Carries the whole VectorItemRow rather than flattened fields
because the row struct already mirrors the shadow table’s column order.
Boxed so the six-string row does not widen the whole enum: every op in
a fan-out pays for the largest variant, and the size should stay
pinned by InsertGsi (see the size test below).