Skip to main content

parse_directory

Function parse_directory 

Source
pub fn parse_directory(
    root: &Path,
    ignores: &[Pattern],
) -> Result<Catalog, ParseError>
Expand description

Parse every *.sql file under root, recursively, and produce a fully- populated Catalog. Files matching any pattern in ignores are skipped.

Walking is deterministic (paths are sorted before processing), and each statement classifies through the v0.1 whitelist; non-MVP DDL kinds raise ParseError::UnsupportedObjectKind with a phase-2 message.

After all files have been processed, the catalog is canonicalized (vec- sorted) and duplicate qnames raise ParseError::DuplicateObject.