Skip to main content

detect_source_table

Function detect_source_table 

Source
pub fn detect_source_table(sql: &str) -> Option<String>
Expand description

Detect whether a SQL query targets a single table and return that table name.

Returns Some(table_name) if the query is a simple single-table SELECT, or None if the query is too complex to edit safely.