Skip to main content

parse_statements_with_scratch

Function parse_statements_with_scratch 

Source
pub fn parse_statements_with_scratch(
    sql: &str,
    scratch: &mut StatementParseScratch,
) -> Result<Vec<Statement>, ParseError>
Expand description

Parse all statements from sql using caller-owned token/error lookaside.

Semantically-empty input (empty string, whitespace, comments, or bare ; separators) parses to an empty statement list, matching stock SQLite: sqlite3_prepare_v2 of such input returns SQLITE_OK with a NULL statement — a no-op, never a parse error. The single-statement callers below still reject an empty list on their own where exactly one statement is required. bd-parser-errfmt-residuals-3giu1.