Skip to main content

Module stub

Module stub 

Source
Expand description

DDL that recreates a recorded column schema as a relation.

Used both by the in-process typechecking catalog and by the container the explain command stages against, so it lives beside the contract rather than inside either consumer.

A schema of ordinary types is a CREATE TABLE. A record has no data-type syntax, so a schema containing one becomes a view over helper tables: a relation alias in expression position plans to a record with that relation’s field names and nullability (mz_sql::plan::query::plan_identifier), which is the only way to spell an anonymous record in SQL.

StructsΒ§

StubNames πŸ”’
Allocates names for the helper relations and aliases of one stub.
StubTarget πŸ”’
Where a stub and its helper relations are created.

EnumsΒ§

StubError πŸ”’
A recorded type that cannot be turned back into a relation.

FunctionsΒ§

build_select πŸ”’
A SELECT whose output columns are exactly fields.
build_stub_statements πŸ”’
The statements that recreate columns as target.name.
check_reconstructible πŸ”’
Reject a type the builder cannot express, naming the column that carries it.
column_def πŸ”’
"name" <type>[ NOT NULL] for a table column.