Skip to main content

parse

Function parse 

Source
pub fn parse(sql: &str) -> Result<Vec<ParsedStatement>>
Expand description

Parse a full SQL string into a list of ParsedStatements.

Fault-tolerant: unparseable statements (e.g. PL/pgSQL functions, custom extensions) are returned as ParsedStatement::Other rather than causing the whole file to fail.

B-01 fix: After sqlparser processing, a belt-and-suspenders sweep of the raw text checks for dangerous keywords that sqlparser might not have modelled (e.g. ATTACH PARTITION, CREATE POLICY).