Skip to content
# Class: ColumnConstraintDefinition

Defined in: packages/core/src/models/CreateTableQuery.ts:69

Column-level constraint definition.

Extends ​

Constructors ​

Constructor ​

new ColumnConstraintDefinition(params): ColumnConstraintDefinition

Defined in: packages/core/src/models/CreateTableQuery.ts:78

Parameters ​

params ​
kind ​

ColumnConstraintKind

constraintName? ​

IdentifierString

defaultValue? ​

ValueComponent

checkExpression? ​

ValueComponent

reference? ​

ReferenceDefinition

rawClause? ​

RawString

Returns ​

ColumnConstraintDefinition

Overrides ​

SqlComponent.constructor

Properties ​

kind ​

static kind: symbol

Defined in: packages/core/src/models/CreateTableQuery.ts:70

Overrides ​

SqlComponent.kind


kind ​

kind: ColumnConstraintKind

Defined in: packages/core/src/models/CreateTableQuery.ts:71


constraintName? ​

optional constraintName: IdentifierString

Defined in: packages/core/src/models/CreateTableQuery.ts:72


defaultValue? ​

optional defaultValue: ValueComponent

Defined in: packages/core/src/models/CreateTableQuery.ts:73


checkExpression? ​

optional checkExpression: ValueComponent

Defined in: packages/core/src/models/CreateTableQuery.ts:74


reference? ​

optional reference: ReferenceDefinition

Defined in: packages/core/src/models/CreateTableQuery.ts:75


rawClause? ​

optional rawClause: RawString

Defined in: packages/core/src/models/CreateTableQuery.ts:76


comments ​

comments: string[] | null = null

Defined in: packages/core/src/models/SqlComponent.ts:29

Inherited from ​

SqlComponent.comments


positionedComments ​

positionedComments: PositionedComment[] | null = null

Defined in: packages/core/src/models/SqlComponent.ts:32

Inherited from ​

SqlComponent.positionedComments

Methods ​

getKind() ​

getKind(): symbol

Defined in: packages/core/src/models/SqlComponent.ts:15

Returns ​

symbol

Inherited from ​

SqlComponent.getKind


accept() ​

accept<T&gt;(visitor): T

Defined in: packages/core/src/models/SqlComponent.ts:19

Type Parameters ​

T ​

T

Parameters ​

visitor ​

SqlComponentVisitor<T&gt;

Returns ​

T

Inherited from ​

SqlComponent.accept


toSqlString() ​

toSqlString(formatter): string

Defined in: packages/core/src/models/SqlComponent.ts:23

Parameters ​

formatter ​

SqlComponentVisitor<string&gt;

Returns ​

string

Inherited from ​

SqlComponent.toSqlString


addPositionedComments() ​

addPositionedComments(position, comments): void

Defined in: packages/core/src/models/SqlComponent.ts:37

Add comments at a specific position

Parameters ​

position ​

"before" | "after"

comments ​

string[]

Returns ​

void

Inherited from ​

SqlComponent.addPositionedComments


getPositionedComments() ​

getPositionedComments(position): string[]

Defined in: packages/core/src/models/SqlComponent.ts:56

Get comments for a specific position

Parameters ​

position ​

"before" | "after"

Returns ​

string[]

Inherited from ​

SqlComponent.getPositionedComments


getAllPositionedComments() ​

getAllPositionedComments(): string[]

Defined in: packages/core/src/models/SqlComponent.ts:66

Get all positioned comments as a flat array in order (before, after)

Returns ​

string[]

Inherited from ​

SqlComponent.getAllPositionedComments

Released under the MIT License.