Skip to main content

rudb_bind/
lib.rs

1//! Name, type and overload resolution, subquery binding, and the bound logical plan.
2//!
3//! Rank 10 in the layer rule. See `xtask/layers.toml` and `spec/18-package-layout.md`.
4//!
5//! The binder is the pass that turns what someone wrote into what it means. A parse tree says
6//! `SELECT x FROM t`, and only the binder can say which table `t` is, which column `x` is, what
7//! type it has, and therefore what the query does. Everything after this point works on the
8//! answer rather than on the question: the optimizer never resolves a name and the executor never
9//! decides a type.
10//!
11//! What it does not do yet is subqueries, window functions, `WITH`, `VALUES` as a query, and every
12//! statement that is not a `SELECT`. Each of those is an error naming what was written rather than
13//! a silently wrong plan, which is the rule the whole front end follows.
14
15#![forbid(unsafe_code)]
16
17mod binder;
18mod expr;
19mod scope;
20
21pub use binder::{bind, bind_sql};
22
23#[cfg(test)]
24mod tests;