Skip to main content

Module batch_tracker

Module batch_tracker 

Source
Expand description

Batch operation tracker for bulk database operations.

BatchOperationTracker provides specialized tracking for batch inserts, updates, and migrations with batch-level progress, row counts, error tracking, and smoothed rate calculation.

§Example

use sqlmodel_console::renderables::BatchOperationTracker;

let mut tracker = BatchOperationTracker::new("Batch insert", 20, 10000);

// Complete a batch of 500 rows
tracker.complete_batch(500);

// Plain text: "Batch insert: 5% (1/20 batches), 500/10000 rows, 0 errors"
println!("{}", tracker.render_plain());

Structs§

BatchOperationTracker
A tracker for bulk database operations with batch-level progress.

Enums§

BatchState
State for batch tracker styling.