22 unstable releases (8 breaking)

0.12.2 Jun 10, 2024
0.11.3 Feb 11, 2024
0.11.1 Dec 26, 2023
0.10.1 Nov 14, 2023
0.6.1 Mar 13, 2023

#1545 in Procedural macros

Apache-2.0

735KB
18K SLoC

Macros for PRQL compilation at build time.

use prql_compiler_macros::prql_to_sql;

let sql: &str = prql_to_sql!("from albums | select {title, artist_id}");
assert_eq!(sql, "SELECT title, artist_id FROM albums");

"at build time" means that PRQL will be compiled during Rust compilation, producing errors alongside Rust errors. Limited to string literals.

Dependencies

~10–19MB
~251K SLoC