qrlew/lib.rs
1//! # [Qrlew](https://qrlew.github.io/) framework (by [Sarus](https://www.sarus.tech/))
2//! Open source SQL manipulation framework written in Rust
3//!
4//! ## What is [Qrlew](https://qrlew.github.io/)?
5//! [Qrlew](https://qrlew.github.io/) is an open source library that aims to parse and compile SQL queries into an Intermediate Representation (IR) that is well-suited for various rewriting tasks. Although it was originally designed for privacy-focused applications, it can be utilized for a wide range of purposes.
6//!
7//! ### SQL Query IR
8//! [Qrlew](https://qrlew.github.io/) transforms a SQL query into a combination of simple operations such as Map, Reduce and Join that are applied to Tables. This representation simplifies the process of rewriting queries and reduces dependencies on the diverse range of syntactic constructs present in SQL.
9//!
10//! ### Type Inference Engine
11//! Differential Privacy (DP) guaranrtees are hard to obtain without destroying too much information. In many mechanisms having prior bounds on values can improve the utility of DP results dramatically. By propagating types cleverly, [Qrlew](https://qrlew.github.io/) can returns bounds for all values.
12//!
13//! ### Differential Privacy compiler
14//! [Qrlew](https://qrlew.github.io/) can compile SQL queries into Differentially Private ones. The process is inspired by Wilson et al. 2020. The complexity of the compilation process makes [Qrlew](https://qrlew.github.io/) IR very useful at delivering clean, readable and reliable code.
15//!
16
17#![recursion_limit = "1024"]
18pub mod data_type;
19pub mod setup;
20#[macro_use]
21pub mod expr;
22pub mod builder;
23pub mod debug;
24pub mod dialect_translation;
25pub mod differential_privacy;
26pub mod display;
27pub mod encoder;
28pub mod hierarchy;
29pub mod io;
30pub mod namer;
31pub mod privacy_unit_tracking;
32pub mod relation;
33pub mod rewriting;
34pub mod sampling_adjustment;
35pub mod sql;
36pub mod synthetic_data;
37pub mod types;
38pub mod visitor;
39
40pub use builder::{Ready, With, WithContext, WithIterator, WithoutContext};
41pub use data_type::{value::Value, DataType};
42pub use expr::Expr;
43pub use relation::Relation;
44/// Expose sqlparser::ast as part of qrlew
45pub use sqlparser::{ast, dialect, parser, tokenizer};
46pub use types::{And, Factor, Or, Term};