Function prql_compiler::compile

source ·
pub fn compile(prql: &str) -> Result<String>
Expand description

Compile a PRQL string into a SQL string.

This has three stages:

  • parse — Build PL AST from a PRQL string
  • semantic::resolve — Finds variable references, validates functions calls, determines frames and converts PL to RQ.
  • sql::translate — Convert RQ AST into an SQL string.