MCPcopy Create free account
hub / github.com/influxdata/influxdb / encode_write

Function encode_write

core/mutable_batch_pb/src/encode.rs:16–25  ·  view source on GitHub ↗

Convert a [`DmlWrite`] to a [`DatabaseBatch`]

(database_id: i64, write: &DmlWrite)

Source from the content-addressed store, hash-verified

14
15/// Convert a [`DmlWrite`] to a [`DatabaseBatch`]
16pub fn encode_write(database_id: i64, write: &DmlWrite) -> DatabaseBatch {
17 DatabaseBatch {
18 table_batches: write
19 .tables()
20 .map(|(table_id, batch)| encode_batch(table_id.get(), batch))
21 .collect(),
22 partition_key: write.partition_key().to_string(),
23 database_id,
24 }
25}
26
27/// Encode the given mutable batch to a [`TableBatchWithoutId`]. Basically same as [`encode_batch`],
28/// but when you don't have an id.

Callers

nothing calls this directly

Calls 5

encode_batchFunction · 0.85
collectMethod · 0.80
tablesMethod · 0.45
getMethod · 0.45
partition_keyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…