Skip to main content

Module model

Module model 

Source

Structs§

CheckConstraint
Column
ColumnMapping
Mapping from virtual column name (what apps see) to physical column name in the base table. Used during expand/contract migrations where temporary columns (e.g., pgroll_new*) are created.
DefaultPrivilege
A default privilege entry - privileges automatically granted when a role creates objects
Domain
DomainConstraint
EnumType
Extension
ForeignKey
Function
FunctionArg
Grant
Index
Partition
PartitionKey
PendingComment
PendingGrant
Represents a pending GRANT parsed from a GRANT statement. Used for cross-file resolution when GRANT statements are in separate files from object definitions.
PendingOwner
Represents a pending ownership assignment parsed from ALTER … OWNER TO statements. Used for cross-file resolution when object definitions and ownership are in separate files.
PendingRevoke
Represents a pending REVOKE parsed from a REVOKE statement. Used for cross-file resolution when REVOKE statements are in separate files from object definitions.
PgSchema
Represents a PostgreSQL schema (namespace).
Policy
PrimaryKey
QualifiedName
A PostgreSQL qualified name consisting of a schema and object name.
Schema
Sequence
SequenceOwner
Table
Trigger
VersionSchema
Metadata about a version schema used for expand/contract migrations.
VersionView
A view in a version schema that maps to a base table. Used for zero-downtime migrations where multiple schema versions coexist.
View

Enums§

ArgMode
DefaultPrivilegeObjectType
Object types that can have default privileges
IndexType
PartitionBound
PartitionStrategy
PendingCommentObjectType
PendingGrantObjectType
PendingOwnerObjectType
PgType
PolicyCommand
Privilege
ReferentialAction
SecurityType
SequenceDataType
TriggerEnabled
TriggerEvent
TriggerTiming
Volatility

Functions§

normalize_pg_type
Normalizes PostgreSQL type aliases to their canonical forms. This ensures consistent comparison between parsed SQL and introspected schemas.
parse_qualified_name
Parses a qualified name into (schema, name) tuple. Defaults to “public” schema if no dot separator found.
qualified_name
Creates a qualified name from schema and object name. Used as map keys for schema-aware lookups.
revoke_from_grants
Removes or modifies grants matching the given grantee and privileges.
versioned_schema_name
Helper to create a versioned schema name from base schema and version.