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:
- Which databases to replicate (multi-select)
- For each selected database: tables to include (Enter = include all)
- For each selected database: tables to replicate schema-only (no data)
- For each selected database: time-based filters
- 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?;