Skip to main content

reifydb_engine/bulk_insert/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 ReifyDB
3
4//! Fast path for inserting many rows at once: validates the batch up front and writes through the storage commit
5//! path instead of the per-row VM dispatch loop. Validation here must match what the per-row INSERT path applies;
6//! any divergence lets one path accept rows the other rejects and silently produces inconsistent state.
7
8pub mod builder;
9pub mod coerce;
10pub mod storage;
11pub mod validation;
12
13#[derive(Debug, Clone, Default)]
14pub struct BulkInsertResult {
15	pub tables: Vec<TableInsertResult>,
16	pub ringbuffers: Vec<RingBufferInsertResult>,
17	pub series: Vec<SeriesInsertResult>,
18}
19
20#[derive(Debug, Clone)]
21pub struct TableInsertResult {
22	pub namespace: String,
23	pub table: String,
24	pub inserted: u64,
25}
26
27#[derive(Debug, Clone)]
28pub struct RingBufferInsertResult {
29	pub namespace: String,
30	pub ringbuffer: String,
31	pub inserted: u64,
32}
33
34#[derive(Debug, Clone)]
35pub struct SeriesInsertResult {
36	pub namespace: String,
37	pub series: String,
38	pub inserted: u64,
39}