@rex0220/kintone-sql-tools 3.70.0 → 3.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  {
2
- "generatedAt": "2026-08-21T15:03:34.935Z",
2
+ "generatedAt": "2026-08-21T22:20:59.339Z",
3
3
  "baseline": "B66 Phase1 initial measured values; no arbitrary size ceiling",
4
4
  "bundles": {
5
5
  "index.cjs": {
6
6
  "inputCount": 115,
7
- "minifiedBytes": 680144,
8
- "gzipBytes": 185767,
7
+ "minifiedBytes": 680354,
8
+ "gzipBytes": 185838,
9
9
  "forbidden": {
10
10
  "mcp-instructions": [],
11
11
  "src-mcp": [],
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "index.mjs": {
26
26
  "inputCount": 115,
27
- "minifiedBytes": 679599,
28
- "gzipBytes": 185448,
27
+ "minifiedBytes": 679809,
28
+ "gzipBytes": 185514,
29
29
  "forbidden": {
30
30
  "mcp-instructions": [],
31
31
  "src-mcp": [],
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "ksql-engine.umd.js": {
46
46
  "inputCount": 117,
47
- "minifiedBytes": 680623,
48
- "gzipBytes": 185765,
47
+ "minifiedBytes": 680833,
48
+ "gzipBytes": 185830,
49
49
  "forbidden": {
50
50
  "mcp-instructions": [],
51
51
  "src-mcp": [],
@@ -1446,7 +1446,7 @@
1446
1446
  "format": "esm"
1447
1447
  },
1448
1448
  "src/execute.ts": {
1449
- "bytes": 593690,
1449
+ "bytes": 611305,
1450
1450
  "imports": [
1451
1451
  {
1452
1452
  "path": "src/lexer/lexer.ts",
@@ -2460,7 +2460,7 @@
2460
2460
  "bytesInOutput": 412
2461
2461
  },
2462
2462
  "src/execute.ts": {
2463
- "bytesInOutput": 235779
2463
+ "bytesInOutput": 235989
2464
2464
  },
2465
2465
  "src/engine-library/errors.ts": {
2466
2466
  "bytesInOutput": 1441
@@ -2517,7 +2517,7 @@
2517
2517
  "bytesInOutput": 1406
2518
2518
  }
2519
2519
  },
2520
- "bytes": 680144
2520
+ "bytes": 680354
2521
2521
  }
2522
2522
  }
2523
2523
  }
@@ -1446,7 +1446,7 @@
1446
1446
  "format": "esm"
1447
1447
  },
1448
1448
  "src/execute.ts": {
1449
- "bytes": 593690,
1449
+ "bytes": 611305,
1450
1450
  "imports": [
1451
1451
  {
1452
1452
  "path": "src/lexer/lexer.ts",
@@ -2464,7 +2464,7 @@
2464
2464
  "bytesInOutput": 412
2465
2465
  },
2466
2466
  "src/execute.ts": {
2467
- "bytesInOutput": 235779
2467
+ "bytesInOutput": 235989
2468
2468
  },
2469
2469
  "src/engine-library/errors.ts": {
2470
2470
  "bytesInOutput": 1441
@@ -2524,7 +2524,7 @@
2524
2524
  "bytesInOutput": 16
2525
2525
  }
2526
2526
  },
2527
- "bytes": 679599
2527
+ "bytes": 679809
2528
2528
  }
2529
2529
  }
2530
2530
  }
@@ -1446,7 +1446,7 @@
1446
1446
  "format": "esm"
1447
1447
  },
1448
1448
  "src/execute.ts": {
1449
- "bytes": 593690,
1449
+ "bytes": 611305,
1450
1450
  "imports": [
1451
1451
  {
1452
1452
  "path": "src/lexer/lexer.ts",
@@ -2478,7 +2478,7 @@
2478
2478
  "bytesInOutput": 412
2479
2479
  },
2480
2480
  "src/execute.ts": {
2481
- "bytesInOutput": 235779
2481
+ "bytesInOutput": 235989
2482
2482
  },
2483
2483
  "src/engine-library/errors.ts": {
2484
2484
  "bytesInOutput": 1441
@@ -2544,7 +2544,7 @@
2544
2544
  "bytesInOutput": 127
2545
2545
  }
2546
2546
  },
2547
- "bytes": 680623
2547
+ "bytes": 680833
2548
2548
  }
2549
2549
  }
2550
2550
  }
@@ -1,13 +1,14 @@
1
1
  import { createKintoneClient } from "./writableClient";
2
2
  import { KsqlFlowError } from "./errors";
3
- import type { CreateExecutionContextOptions, Diagnostic, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, ParseScriptOptions, ParseScriptResult, Statement, StatementResult, ValidateScriptOptions } from "./publicTypes";
3
+ import type { CreateExecutionContextOptions, Diagnostic, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, ParseScriptOptions, ParseScriptResult, PreviewResult, PreviewStatementOptions, Statement, StatementResult, ValidateScriptOptions } from "./publicTypes";
4
4
  export declare const version: string;
5
5
  export declare function parseScript(source: string, opts?: ParseScriptOptions): ParseScriptResult;
6
6
  export declare function validateScript(source: string, opts?: ValidateScriptOptions): Promise<Diagnostic[]>;
7
7
  export declare function explainScript(source: string, opts: ExplainScriptOptions): Promise<ExplainScriptResult>;
8
8
  export declare function createExecutionContext(opts: CreateExecutionContextOptions): ExecutionContext;
9
+ export declare function previewStatement(statement: Statement, context: ExecutionContext, opts?: PreviewStatementOptions): Promise<PreviewResult>;
9
10
  export declare function executeStatement(statement: Statement, context: ExecutionContext): Promise<StatementResult>;
10
11
  export declare function disposeExecutionContext(context: ExecutionContext): Promise<void>;
11
12
  export { isDmlResult } from "./publicTypes";
12
13
  export { createKintoneClient, KsqlFlowError };
13
- export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowChunkWrittenInfo, FlowDeleteResult, FlowDmlResult, FlowInsertResult, FlowKintoneClient, FlowUpdateResult, FlowUpsertResult, ParseScriptOptions, ParseScriptResult, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
14
+ export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowChunkWrittenInfo, FlowDeleteResult, FlowDmlResult, FlowInsertResult, FlowKintoneClient, FlowUpdateResult, FlowUpsertResult, ParseScriptOptions, ParseScriptResult, PreviewResult, PreviewSample, PreviewStatementOptions, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
@@ -254,6 +254,36 @@ export interface StatementResult {
254
254
  /** コンテキスト開始から当該文終了時までの累積 deep-copy スナップショット。文単位値は前回との差分で求める。 */
255
255
  metrics: ExecutionMetrics;
256
256
  }
257
+ export interface PreviewStatementOptions {
258
+ /** Number of write-order samples to return. Defaults to 5. */
259
+ maxSamples?: number;
260
+ }
261
+ export interface PreviewSample {
262
+ kind: "insert" | "update" | "delete";
263
+ /** UPSERT key, or the kintone record ID for DELETE. */
264
+ key?: string;
265
+ /** Current values of assignment target fields only. */
266
+ before?: Record<string, string>;
267
+ /** Values that the DML statement would write. */
268
+ after?: Record<string, string>;
269
+ }
270
+ export interface PreviewResult {
271
+ kind: "PREVIEW";
272
+ operation: "INSERT" | "UPDATE" | "DELETE" | "UPSERT";
273
+ /** Physical kintone app ID after logical-app routing. */
274
+ appId: number;
275
+ counts: {
276
+ insert: number;
277
+ update: number;
278
+ delete: number;
279
+ };
280
+ /** First maxSamples entries in actual write order. */
281
+ samples: PreviewSample[];
282
+ /** Record-read API calls consumed by this preview. */
283
+ reads: number;
284
+ /** Estimated 100-record write API calls for an ordinary execution. */
285
+ estimatedWrites: number;
286
+ }
257
287
  export interface CreateKintoneClientConfig {
258
288
  baseUrl: string;
259
289
  guestSpaceId?: number;