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 advanced filtering

Presents a terminal UI for selecting:

  1. Which databases to replicate (multi-select)
  2. For each selected database:
    • Which tables to exclude entirely
    • Which tables to replicate schema-only (no data)
    • Which tables to apply time-based filters
  3. Summary and confirmation

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?;