DdlCommand
Defined in: js-api/src/entities/data-connection.ts:476
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:477
Parameters
| Parameter | Type |
|---|---|
connectionId | string |
_mutation | Record<string, any> |
Returns
DdlCommand
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
connectionId | readonly | string | js-api/src/entities/data-connection.ts:477 |
Methods
dryRun()
dryRun():
Promise<DdlPlan>
Defined in: js-api/src/entities/data-connection.ts:482
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:489
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
| Parameter | Type |
|---|---|
options | { confirmDestructive?: boolean; } |
options.confirmDestructive? | boolean |
Returns
Promise<MutationResult>