select_databases_and_tables

Function select_databases_and_tables 

Source
pub async fn select_databases_and_tables(
    source_url: &str,
) -> Result<(ReplicationFilter, TableRules)>
Expand description

Interactive database and table selection with back navigation

Presents a terminal UI for selecting:

  1. Which databases to replicate (multi-select)
  2. For each selected database: tables to include (Enter = include all)
  3. For each selected database: tables to replicate schema-only (no data)
  4. For each selected database: time-based filters
  5. Summary and confirmation

Supports back navigation:

  • Cancel/Esc from any step → go back to previous step

Returns a tuple of (ReplicationFilter, TableRules) representing the user’s selections.

§Arguments

  • source_url - PostgreSQL connection string for source database

§Returns

Returns Ok((ReplicationFilter, TableRules)) with the user’s selections or an error if:

  • Cannot connect to source database
  • Cannot discover databases or tables
  • User cancels the operation

§Examples

let (filter, rules) = select_databases_and_tables(
    "postgresql://user:pass@source.example.com/postgres"
).await?;