Skip to main content

Crate spg_sql

Crate spg_sql 

Source
Expand description

SPG SQL front-end. v0.2 ships only the lexer + a minimal recursive-descent parser for the SELECT [..] FROM [..] WHERE [..] subset.

Layers (each in its own module):

  • lexer — byte stream → tokens
  • ast — abstract syntax tree types + Display (pretty-print)
  • parser — tokens → AST (Pratt parser for expression precedence)

Re-exports§

pub use parser::parse_function_body;

Modules§

ast
AST for the PG-dialect subset SPG accepts in v0.2.
lexer
Lexer for the PG-dialect subset that SPG accepts.
parser
Recursive-descent parser with a Pratt (precedence-climbing) sub-parser for expressions.

Functions§

silent_for_update_count
v7.37.14 (A2.5-stub) — read the process-wide silent-FOR-UPDATE counter. Engines / spgctl / monitoring use this to surface “how many advisory row locks did the workload ask for since process start”. Returns 0 if no FOR UPDATE / FOR SHARE clause has hit the parser yet.