Skip to main content

build_snapshot_query

Function build_snapshot_query 

Source
fn build_snapshot_query(
    outputs: &[SourceOutputInfo],
    pk_range: Option<&PkRange>,
) -> String
Expand description

Builds the SQL query to be used for creating the snapshot using the first entry in outputs.

Expect outputs to contain entries for a single table, and to have at least 1 entry. Expect that each MySqlTableDesc entry contains all columns described in information_schema.columns.

When pk_range is provided, a WHERE clause is appended to filter rows by PK range.