Skip to main content

Module builder

Module builder 

Source
Expand description

AST → IR builders.

Each submodule consumes one classified crate::parse::Statement variant and produces zero-or-more IR objects, optionally appended to a partial crate::ir::catalog::Catalog via Builder.

Modules§

alter_table_attach_partition
ALTER TABLE parent ATTACH PARTITION child FOR VALUES ... — back-fills partition_of on an already-parsed child Table.
alter_table_stmt
ALTER TABLE support for source DDL.
comment_stmt
COMMENT ON ... — apply a comment to an existing IR object in a partial Catalog.
create_composite_type_stmt
Source-side parser for CREATE TYPE x AS (...) (composite types).
create_domain_stmt
Source-side parser for CREATE DOMAIN.
create_enum_stmt
Source-side parser for CREATE TYPE x AS ENUM (...).
create_extension_stmt
CREATE EXTENSIONcrate::ir::extension::Extension.
create_function_stmt
Source-side parser for CREATE FUNCTION and CREATE PROCEDURE.
create_materialized_view_stmt
CREATE MATERIALIZED VIEWcrate::ir::view::MaterializedView.
create_schema_stmt
CREATE SCHEMAcrate::ir::schema::Schema.
create_seq_stmt
CREATE SEQUENCEcrate::ir::sequence::Sequence.
create_stmt
CREATE TABLEcrate::ir::table::Table.
create_trigger_stmt
Source parser for CREATE [CONSTRAINT] TRIGGER statements.
create_view_stmt
CREATE VIEWcrate::ir::view::View.
default_privileges
ALTER DEFAULT PRIVILEGES ... GRANT ... — future-object grants.
desugar_serial
SERIAL desugaring.
grants
GRANT priv ON obj TO grantee — object-level grants.
index_stmt
CREATE INDEXcrate::ir::index::Index.
owner_stmt
ALTER <objkind> name OWNER TO role — ownership assignment.
plpgsql
PL/pgSQL body parsing — dep extraction, COMMIT/ROLLBACK detection, -- @pgevolve dep: directive scanning.
policy_stmt
CREATE POLICY name ON tablename ... — RLS policy declarations.
publication_stmt
Parser for CREATE PUBLICATION and ALTER PUBLICATION statements.
reloptions
Decode WITH (key = value, ...) reloption clauses from DefElem nodes.
shared
Helpers shared by all AST → IR builders.
statistic_stmt
Parser for CREATE STATISTICS and ALTER STATISTICS statements.
subscription_stmt
Parser for CREATE SUBSCRIPTION and ALTER SUBSCRIPTION statements.

Structs§

Builder
Mutable accumulator passed through builders during a single parse_directory pass.