Skip to main content

Module parser

Module parser 

Source
Expand description

Thin wrapper around sqlparser-rs.

Normalises the raw AST into our own ParsedStatement enum so the rest of the tool never needs to import sqlparser types directly.

Structs§

ColumnInfo
ForeignKeyInfo

Enums§

ParsedStatement
Normalised view of every SQL statement we care about.

Constants§

UNSAFE_KEYWORDS
SQL keywords that are dangerous but may not be modelled by our ParsedStatement enum. Any segment containing one of these — even if sqlparser can’t parse it — gets emitted as Other with the “Unmodelled DDL” note so the engine can score it.

Functions§

check_unsafe_keywords
Returns Some(note) if raw (uppercased) contains any known unsafe keyword.
parse
Parse a full SQL string into a list of ParsedStatements.