Skip to main content

DdlCommand

Defined in: js-api/src/entities/data-connection.ts:445

A single addressed DDL operation, built by DdlBuilder. dryRun() returns the plan without executing; execute() recomputes the plan server-side and refuses destructive actions with DdlConfirmationRequiredError unless confirmed.

Constructors​

Constructor​

new DdlCommand(connectionId, _mutation): DdlCommand

Defined in: js-api/src/entities/data-connection.ts:446

Parameters​

ParameterType
connectionIdstring
_mutationRecord<string, any>

Returns​

DdlCommand

Properties​

PropertyModifierTypeDefined in
connectionIdreadonlystringjs-api/src/entities/data-connection.ts:446

Methods​

dryRun()​

dryRun(): Promise<DdlPlan>

Defined in: js-api/src/entities/data-connection.ts:451

Returns the execution plan — exact per-provider SQL and live-data destructive pre-checks — without executing anything. Passes the same privilege and capability gates as a real run.

Returns​

Promise<DdlPlan>


execute()​

execute(options?): Promise<MutationResult>

Defined in: js-api/src/entities/data-connection.ts:458

Executes the operation. When the recomputed plan has destructive actions (drop/truncate table, drop column, type change) and confirmDestructive is not set, rejects with DdlConfirmationRequiredError carrying the plan.

Parameters​

ParameterType
options{ confirmDestructive?: boolean; }
options.confirmDestructive?boolean

Returns​

Promise<MutationResult>