1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (c) 2022-2026 Zain Dana Harper.
//! BuildDB tables for a compiled program, and BuildQL over them.
//!
//! BuildDB is qdb, the SQL engine written in BuildLang (`bdb/db.bld` in this
//! repository), and BuildQL is qdb's SQL dialect. This
//! module is the compiler side of that pair:
//!
//! - [`Store`] turns one compiled program into tables: `functions`, `effects`,
//! `calls` and `items`, derived from the AST, the type checker's effect
//! summaries and MIR.
//! - [`export::to_qdb`] writes those tables in qdb's checkpoint file format, so
//! `qdb program.qdb "SELECT ..."` runs the full dialect over them.
//! - [`query`] runs a small subset of the same dialect in process, so the
//! compiler and its tests can ask questions without a qdb binary. Anything
//! outside the subset is refused with a message that names qdb.
//! - [`rename`] is the first transform: rename a free function and every
//! reference to it, then re-lower the result and check that MIR is
//! unchanged apart from the name. A receipt records both digests.
//! - [`drift`] is the reference route for incremental views: the store after
//! a rename made from the old rows, and a table-by-table diff of any store
//! against a full rebuild.
pub use ;
pub use ;
pub use ;
pub use ;
/// Errors from loading, querying or transforming a program store.