/** * Postgres 18 table type. * * Postgres uses declarative partitioning: a table is partitioned by one strategy * (`range`, `list`, or `hash`) over one or more existing key columns. Each * partition entry names a key column (`name`) and the strategy (`type`); all * entries on a table must share one strategy. */ import { Violation } from '../model'; import { TableTypeBase } from '../table-type'; /** Postgres 18 table. */ export declare class Postgres18Table extends TableTypeBase { /** * Validate a column type against the Postgres type registry. * * @param type Type string from a column definition. * @returns True when the type is a valid Postgres 18 type. */ isValidColumnType(type: string): boolean; /** * Postgres partition rules. * * Emits: `NO_DUPLICATE_PARTITIONS` (a key column listed twice), * `POSTGRES_PARTITION_COLUMN_EXISTS` (the key column must be a data column), * `POSTGRES_PARTITION_STRATEGY_VALID` (the strategy must be range / list / * hash), and `POSTGRES_PARTITION_SINGLE_STRATEGY` (a table partitions by one * strategy only). * * @returns Every partition-related violation. */ partitionViolations(): Violation[]; /** * Postgres engine-specific rules: indexes, unique constraints, and check * constraints. * * @returns Every engine-specific violation. */ engineSpecificViolations(): Violation[]; /** * Validate exclusion constraints. * * Emits `POSTGRES_EXCLUSION_NAME_UNIQUE`, `POSTGRES_EXCLUSION_METHOD_VALID`, * `POSTGRES_EXCLUSION_COLUMN_EXISTS`, `POSTGRES_EXCLUSION_NO_DUPLICATE_COLUMNS`, * and `POSTGRES_EXCLUSION_INCLUDES_PARTITION_KEYS`. * * @returns Every exclusion-constraint violation. */ private exclusionConstraintViolations; /** * Validate Postgres column attributes: identity columns, the mutual * exclusivity between being generated / an identity / having a default, and * per-column collation, compression, and storage. * * Emits `POSTGRES_IDENTITY_VALID`, `POSTGRES_IDENTITY_TYPE_INTEGER`, * `POSTGRES_COLUMN_GENERATION_EXCLUSIVE`, `POSTGRES_COLLATION_ON_TEXT_TYPE`, * `POSTGRES_COMPRESSION_VALID`, and `POSTGRES_STORAGE_VALID`. * * @returns Every column-attribute violation. */ private columnAttributeViolations; /** * Validate generated columns. * * Emits `POSTGRES_GENERATED_KIND_VALID`, * `POSTGRES_GENERATED_EXPRESSION_COLUMN_EXISTS`, * `POSTGRES_GENERATED_NO_SELF_REFERENCE`, * `POSTGRES_GENERATED_NO_GENERATED_REFERENCE`, * `POSTGRES_GENERATED_NOT_IN_PARTITION_KEY`, and * `POSTGRES_VIRTUAL_GENERATED_NOT_IN_PK`. * * @returns Every generated-column violation. */ private generatedColumnViolations; /** * Validate UNIQUE constraints. * * Emits `POSTGRES_UNIQUE_NAME_UNIQUE`, `POSTGRES_UNIQUE_COLUMN_EXISTS`, and * `POSTGRES_UNIQUE_NO_DUPLICATE_COLUMNS`. * * @returns Every unique-constraint violation. */ private uniqueConstraintViolations; private uniqueConstraintKeyViolations; /** * Validate CHECK constraints. Only the explicit referenced-column list is * checked; the predicate itself stays opaque. * * Emits `POSTGRES_CHECK_NAME_UNIQUE` and `POSTGRES_CHECK_COLUMN_EXISTS`. * * @returns Every check-constraint violation. */ private checkConstraintViolations; /** * Validate secondary indexes. * * Emits `POSTGRES_INDEX_NAME_UNIQUE`, `POSTGRES_INDEX_METHOD_VALID`, * `POSTGRES_INDEX_COLUMN_EXISTS`, `POSTGRES_INDEX_NO_DUPLICATE_COLUMNS`, * `POSTGRES_INDEX_UNIQUE_BTREE_ONLY`, `POSTGRES_INDEX_SORT_VALID`, and * `POSTGRES_INDEX_NULLS_VALID`. * * @returns Every index-related violation. */ private indexViolations; private singleIndexViolations; }