import { BaseSmartTags } from './base-smart-tags'; import { PgTable } from './pg-table'; import { PgType } from './pg-type'; /** * Abstraction over a Postgres table column. */ export interface PgColumn { /** Name of the column. */ name: string; /** Optional display name to override the `name` in the generated GQL API. */ displayName?: string; /** Description of the property. */ readonly description?: string; /** Reference to the parent table that holds this column. */ readonly table: PgTable; /** Postgres data type associated with this column. */ readonly type: PgType; /** Expression defining the column. It will be used inside the CREATE TABLE statement. */ buildExpression(): string; buildSmartTags(): BaseSmartTags; /** Additional statements associated with the column e.g. indexes etc. */ buildAdditionalStatements(): string[]; }