Skip to main content

parse_select_from

Function parse_select_from 

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

Extract the table identifier from a trivial SELECT … FROM <ident> query, stripping surrounding quotes/backticks. Returns None for anything that isn’t a single-table SELECT (the caller then treats the input as Cypher).

This is deliberately minimal — generic Flight SQL drivers (Power BI’s ADBC connector, adbc_driver_flightsql) emit SELECT * FROM "table" to read a table they discovered through GetTables; that is the shape we rewrite.