import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js' ; import { OperationNodeSource } from '../operation-node/operation-node-source.js' ; import { OnModifyForeignAction } from '../operation-node/references-node.js' ; import { preventAwait } from '../util/prevent-await.js' ; export interface ForeignKeyConstraintBuilderInterface < R > { onDelete ( onDelete ) : R ; onUpdate ( onUpdate ) : R ; } export class ForeignKeyConstraintBuilder implements ForeignKeyConstraintBuilderInterface < ForeignKeyConstraintBuilder > , OperationNodeSource { readonly #node : ForeignKeyConstraintNode ; constructor ( node ) { this . #node = node ; } onDelete ( onDelete ) { return new ForeignKeyConstraintBuilder ( ForeignKeyConstraintNode . cloneWith ( this . #node , { onDelete , } ) ) ; } onUpdate ( onUpdate ) { return new ForeignKeyConstraintBuilder ( ForeignKeyConstraintNode . cloneWith ( this . #node , { onUpdate , } ) ) ; } toOperationNode ( ) { return this . #node ; } } preventAwait ( ForeignKeyConstraintBuilder , "don't await ForeignKeyConstraintBuilder instances directly." ) ;