Skip to main content

copy_all_tables

Function copy_all_tables 

Source
pub fn copy_all_tables(
    src: &mut dyn Connection,
    src_backend: Backend,
    dst: &mut dyn Connection,
    dst_backend: Backend,
    opts: &AllTablesOptions,
) -> Result<usize, SqlError>
Expand description

Copy every table from src to dst in FK-respecting order.

Discovers tables via discover_tables, orders them via topo_sort (or falls back to discovery order under opts.no_fk_check), then loops copy_rows per table. Per-table progress is printed to stderr in [i/N] copying <table> (<rows> rows)… shape.

Returns the total number of rows passed through across all tables.