Function prql_compiler::compile

source ·
pub fn compile(
    prql: &str,
    options: Option<Options>
) -> Result<String, ErrorMessages>
Expand description

Compile a PRQL string into a SQL string.

This is a wrapper for:

  • prql_to_pl — Build PL AST from a PRQL string
  • pl_to_rq — Finds variable references, validates functions calls, determines frames and converts PL to RQ.
  • rq_to_sql — Convert RQ AST into an SQL string.