Commands

Enum Commands 

Source
pub enum Commands {
    Split {
        file: PathBuf,
        output: PathBuf,
        dialect: Option<String>,
        tables: Option<String>,
        schema_only: bool,
        data_only: bool,
        verbose: bool,
        progress: bool,
        json: bool,
        dry_run: bool,
        fail_fast: bool,
    },
    Analyze {
        file: PathBuf,
        dialect: Option<String>,
        progress: bool,
        json: bool,
        fail_fast: bool,
    },
    Merge {
        input_dir: PathBuf,
        output: Option<PathBuf>,
        dialect: Option<String>,
        tables: Option<String>,
        exclude: Option<String>,
        transaction: bool,
        no_header: bool,
        progress: bool,
        json: bool,
        dry_run: bool,
    },
    Sample {
Show 19 fields file: PathBuf, output: Option<PathBuf>, dialect: Option<String>, config: Option<PathBuf>, percent: Option<u32>, rows: Option<usize>, seed: Option<u64>, tables: Option<String>, exclude: Option<String>, root_tables: Option<String>, include_global: Option<String>, preserve_relations: bool, strict_fk: bool, no_schema: bool, max_total_rows: Option<usize>, no_limit: bool, progress: bool, json: bool, dry_run: bool,
}, Shard {
Show 16 fields file: PathBuf, output: Option<PathBuf>, dialect: Option<String>, config: Option<PathBuf>, tenant_column: Option<String>, tenant_value: Option<String>, tenant_values: Option<String>, root_tables: Option<String>, include_global: Option<String>, strict_fk: bool, no_schema: bool, max_selected_rows: Option<usize>, no_limit: bool, progress: bool, json: bool, dry_run: bool,
}, Convert { file: PathBuf, output: Option<PathBuf>, from: Option<String>, to: String, strict: bool, progress: bool, json: bool, dry_run: bool, fail_fast: bool, }, Validate { file: PathBuf, dialect: Option<String>, strict: bool, no_fk_checks: bool, fail_fast: bool, max_rows_per_table: usize, no_limit: bool, progress: bool, json: bool, }, Diff {
Show 16 fields old_file: PathBuf, new_file: PathBuf, output: Option<PathBuf>, dialect: Option<String>, tables: Option<String>, exclude: Option<String>, ignore_columns: Option<String>, schema_only: bool, data_only: bool, primary_key: Option<String>, allow_no_pk: bool, ignore_order: bool, max_pk_entries: usize, format: Option<String>, verbose: bool, progress: bool,
}, Completions { shell: Shell, }, }

Variants§

§

Split

Split a SQL dump into individual table files

Fields

§file: PathBuf

Input SQL file or glob pattern (e.g., .sql, dumps/**/.sql)

§output: PathBuf

Output directory for split files

§dialect: Option<String>

SQL dialect: mysql, postgres, sqlite (auto-detected if omitted)

§tables: Option<String>

Only split specific tables (comma-separated)

§schema_only: bool

Only include schema statements (CREATE, ALTER, DROP)

§data_only: bool

Only include data statements (INSERT, COPY)

§verbose: bool

Show verbose output

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§dry_run: bool

Preview without writing files

§fail_fast: bool

Stop on first error (for glob patterns)

§

Analyze

Analyze a SQL dump and display table statistics

Fields

§file: PathBuf

Input SQL file or glob pattern

§dialect: Option<String>

SQL dialect: mysql, postgres, sqlite (auto-detected if omitted)

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§fail_fast: bool

Stop on first error (for glob patterns)

§

Merge

Merge split SQL files back into a single dump

Fields

§input_dir: PathBuf

Directory containing split SQL files

§output: Option<PathBuf>

Output SQL file (default: stdout)

§dialect: Option<String>

SQL dialect for output formatting

§tables: Option<String>

Only merge specific tables (comma-separated)

§exclude: Option<String>

Exclude specific tables (comma-separated)

§transaction: bool

Wrap output in BEGIN/COMMIT transaction

§no_header: bool

Omit header comments

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§dry_run: bool

Preview without writing files

§

Sample

Create a reduced dataset preserving FK relationships

Fields

§file: PathBuf

Input SQL file (supports .gz, .bz2, .xz, .zst)

§output: Option<PathBuf>

Output SQL file (default: stdout)

§dialect: Option<String>

SQL dialect: mysql, postgres, sqlite (auto-detected if omitted)

§config: Option<PathBuf>

YAML config file for per-table settings

§percent: Option<u32>

Sample percentage of rows (1-100)

§rows: Option<usize>

Sample fixed number of rows per table

§seed: Option<u64>

Random seed for reproducible sampling

§tables: Option<String>

Only sample specific tables (comma-separated)

§exclude: Option<String>

Exclude specific tables (comma-separated)

§root_tables: Option<String>

Tables to start sampling from (comma-separated)

§include_global: Option<String>

Handle lookup tables: none, lookups, all

§preserve_relations: bool

Maintain FK integrity by including referenced rows

§strict_fk: bool

Fail on FK integrity violations

§no_schema: bool

Exclude CREATE TABLE statements from output

§max_total_rows: Option<usize>

Max total rows to sample (0 = unlimited)

§no_limit: bool

Disable row limit

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§dry_run: bool

Preview without writing files

§

Shard

Extract tenant-specific data from a multi-tenant dump

Fields

§file: PathBuf

Input SQL file (supports .gz, .bz2, .xz, .zst)

§output: Option<PathBuf>

Output SQL file or directory (default: stdout)

§dialect: Option<String>

SQL dialect: mysql, postgres, sqlite (auto-detected if omitted)

§config: Option<PathBuf>

YAML config file for table classification

§tenant_column: Option<String>

Column containing tenant ID (auto-detected if omitted)

§tenant_value: Option<String>

Single tenant value to extract

§tenant_values: Option<String>

Multiple tenant values (comma-separated, outputs to directory)

§root_tables: Option<String>

Tables containing tenant column (comma-separated)

§include_global: Option<String>

Handle lookup tables: none, lookups, all

§strict_fk: bool

Fail on FK integrity violations

§no_schema: bool

Exclude CREATE TABLE statements from output

§max_selected_rows: Option<usize>

Max rows to select (0 = unlimited)

§no_limit: bool

Disable row limit

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§dry_run: bool

Preview without writing files

§

Convert

Convert a SQL dump between MySQL, PostgreSQL, and SQLite

Fields

§file: PathBuf

Input SQL file or glob pattern

§output: Option<PathBuf>

Output SQL file or directory (default: stdout)

§from: Option<String>

Source dialect (auto-detected if omitted)

§to: String

Target dialect (required)

§strict: bool

Fail on unsupported features instead of warning

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§dry_run: bool

Preview without writing files

§fail_fast: bool

Stop on first error (for glob patterns)

§

Validate

Validate SQL dump syntax, encoding, and data integrity

Fields

§file: PathBuf

Input SQL file or glob pattern

§dialect: Option<String>

SQL dialect: mysql, postgres, sqlite (auto-detected if omitted)

§strict: bool

Treat warnings as errors (exit code 1)

§no_fk_checks: bool

Skip PK/FK data integrity checks

§fail_fast: bool

Stop on first error (for glob patterns)

§max_rows_per_table: usize

Max rows per table for PK/FK checks (0 = unlimited)

§no_limit: bool

Disable row limit for PK/FK checks

§progress: bool

Show progress bar

§json: bool

Output results as JSON

§

Diff

Compare two SQL dumps and report schema + data differences

Fields

§old_file: PathBuf

Original SQL dump file

§new_file: PathBuf

Updated SQL dump file

§output: Option<PathBuf>

Output file (default: stdout)

§dialect: Option<String>

SQL dialect: mysql, postgres, sqlite (auto-detected if omitted)

§tables: Option<String>

Only compare these tables (comma-separated)

§exclude: Option<String>

Exclude these tables (comma-separated)

§ignore_columns: Option<String>

Ignore columns matching glob patterns (e.g., *.updated_at)

§schema_only: bool

Compare schema only, skip data

§data_only: bool

Compare data only, skip schema

§primary_key: Option<String>

Override primary key (format: table:col1+col2,table2:col)

§allow_no_pk: bool

Compare tables without PK using all columns as key

§ignore_order: bool

Ignore column order differences in schema

§max_pk_entries: usize

Max PK entries per table (limits memory)

§format: Option<String>

Output format: text, json, sql

§verbose: bool

Show sample PK values for changes

§progress: bool

Show progress bar

§

Completions

Generate shell completion scripts

Fields

§shell: Shell

Target shell

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V