Interface: ExecuteScriptOptions
Defined in: packages/core/src/script/execute.ts:31
Extends
Properties
| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
clientCommands? | "error" | "process" | Client-side script commands (kind: 'client' — COMMIT/ROLLBACK [RETAIN], SET TRANSACTION, SET AUTODDL, RECONNECT): - 'process' (default): execute them driver-side, isql-style — COMMIT/ ROLLBACK checkpoint the perScript transaction (no-ops in 'perStatement'/'none', which already autocommit), SET TRANSACTION replaces the options for subsequent transactions, SET AUTODDL ON commits after each DDL statement, RECONNECT re-attaches; - 'error': reject each one as a statement error (strict-DSQL scripts; continueOnError applies). Either way, transaction-control statements are NEVER sent to the server — a server-executed COMMIT would silently desync the transaction the executor manages. With a caller-supplied Transaction, every client command is an error: the caller owns the transaction and the connection. | - | packages/core/src/script/execute.ts:72 |
continueOnError? | boolean | Keep going after a statement fails (collects errors). Default false. | - | packages/core/src/script/execute.ts:54 |
onProgress? | (result, total) => void | Called after each statement (success or, with continueOnError, failure). | - | packages/core/src/script/execute.ts:56 |
terminator? | string | Initial statement terminator. Default ';'. | ParseScriptOptions.terminator | packages/core/src/script/parser.ts:58 |
transaction? | | Transaction | "perScript" | "perStatement" | "none" | Transaction scope: - 'perScript' (default) one transaction wraps the whole script; - 'perStatement' a fresh transaction per statement (autocommit-like); - 'none' caller has no transaction; each statement uses its own short transaction via attachment.run semantics; - a Transaction instance: every statement runs on the CALLER's transaction — the script never commits or rolls it back (compose the script atomically with your own work; on a failing statement without continueOnError the error propagates and the transaction stays alive for you to roll back). | - | packages/core/src/script/execute.ts:44 |
transactionOptions? | TransactionOptions | TransactionOptions for the transaction(s) the script opens — applies to 'perScript' and 'perStatement' (on top of the connection's defaultTransaction). Invalid with 'none' (nothing to configure — the implicit per-statement transactions already follow defaultTransaction) or with a caller-supplied Transaction (its options are fixed): throws. | - | packages/core/src/script/execute.ts:52 |