@rex0220/kintone-sql-tools 3.72.0 → 3.73.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.
- package/README.md +9 -0
- package/dist-cli/ksql.js +320 -14
- package/dist-engine/index.cjs +14 -14
- package/dist-engine/index.mjs +14 -14
- package/dist-engine/ksql-engine.umd.js +14 -14
- package/dist-engine/meta/bundle-baseline.json +7 -7
- package/dist-engine/meta/cjs.json +8 -8
- package/dist-engine/meta/esm.json +8 -8
- package/dist-engine/meta/umd.json +8 -8
- package/dist-flow/flow-library/index.d.ts +1 -1
- package/dist-flow/flow-library/publicTypes.d.ts +31 -1
- package/dist-flow/index.cjs +12 -12
- package/dist-flow/index.mjs +12 -12
- package/dist-flow/meta/cjs.json +8 -8
- package/dist-flow/meta/esm.json +8 -8
- package/dist-mcp/ksql-mcp.js +286 -10
- package/dist-mcpb/ksql-mcp.mcpb +0 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-08-
|
|
2
|
+
"generatedAt": "2026-08-25T05:07:37.449Z",
|
|
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":
|
|
8
|
-
"gzipBytes":
|
|
7
|
+
"minifiedBytes": 688651,
|
|
8
|
+
"gzipBytes": 188753,
|
|
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":
|
|
28
|
-
"gzipBytes":
|
|
27
|
+
"minifiedBytes": 688106,
|
|
28
|
+
"gzipBytes": 188456,
|
|
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":
|
|
48
|
-
"gzipBytes":
|
|
47
|
+
"minifiedBytes": 689130,
|
|
48
|
+
"gzipBytes": 188779,
|
|
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":
|
|
1449
|
+
"bytes": 632385,
|
|
1450
1450
|
"imports": [
|
|
1451
1451
|
{
|
|
1452
1452
|
"path": "src/lexer/lexer.ts",
|
|
@@ -1941,7 +1941,7 @@
|
|
|
1941
1941
|
"format": "esm"
|
|
1942
1942
|
},
|
|
1943
1943
|
"src/engine-library/readonlyClient.ts": {
|
|
1944
|
-
"bytes":
|
|
1944
|
+
"bytes": 3057,
|
|
1945
1945
|
"imports": [
|
|
1946
1946
|
{
|
|
1947
1947
|
"path": "src/engine-library/errors.ts",
|
|
@@ -2016,7 +2016,7 @@
|
|
|
2016
2016
|
"format": "esm"
|
|
2017
2017
|
},
|
|
2018
2018
|
"src/engine-library/statementGuard.ts": {
|
|
2019
|
-
"bytes":
|
|
2019
|
+
"bytes": 5179,
|
|
2020
2020
|
"imports": [
|
|
2021
2021
|
{
|
|
2022
2022
|
"path": "src/core/sql.ts",
|
|
@@ -2093,7 +2093,7 @@
|
|
|
2093
2093
|
"format": "esm"
|
|
2094
2094
|
},
|
|
2095
2095
|
"src/engine-library/query.ts": {
|
|
2096
|
-
"bytes":
|
|
2096
|
+
"bytes": 5015,
|
|
2097
2097
|
"imports": [
|
|
2098
2098
|
{
|
|
2099
2099
|
"path": "src/execute.ts",
|
|
@@ -2460,7 +2460,7 @@
|
|
|
2460
2460
|
"bytesInOutput": 412
|
|
2461
2461
|
},
|
|
2462
2462
|
"src/execute.ts": {
|
|
2463
|
-
"bytesInOutput":
|
|
2463
|
+
"bytesInOutput": 243740
|
|
2464
2464
|
},
|
|
2465
2465
|
"src/engine-library/errors.ts": {
|
|
2466
2466
|
"bytesInOutput": 1441
|
|
@@ -2484,7 +2484,7 @@
|
|
|
2484
2484
|
"bytesInOutput": 4310
|
|
2485
2485
|
},
|
|
2486
2486
|
"src/engine-library/readonlyClient.ts": {
|
|
2487
|
-
"bytesInOutput":
|
|
2487
|
+
"bytesInOutput": 1127
|
|
2488
2488
|
},
|
|
2489
2489
|
"src/engine-library/cursorScope.ts": {
|
|
2490
2490
|
"bytesInOutput": 766
|
|
@@ -2514,10 +2514,10 @@
|
|
|
2514
2514
|
"bytesInOutput": 1025
|
|
2515
2515
|
},
|
|
2516
2516
|
"src/engine-library/query.ts": {
|
|
2517
|
-
"bytesInOutput":
|
|
2517
|
+
"bytesInOutput": 1446
|
|
2518
2518
|
}
|
|
2519
2519
|
},
|
|
2520
|
-
"bytes":
|
|
2520
|
+
"bytes": 688651
|
|
2521
2521
|
}
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
"format": "esm"
|
|
1447
1447
|
},
|
|
1448
1448
|
"src/execute.ts": {
|
|
1449
|
-
"bytes":
|
|
1449
|
+
"bytes": 632385,
|
|
1450
1450
|
"imports": [
|
|
1451
1451
|
{
|
|
1452
1452
|
"path": "src/lexer/lexer.ts",
|
|
@@ -1941,7 +1941,7 @@
|
|
|
1941
1941
|
"format": "esm"
|
|
1942
1942
|
},
|
|
1943
1943
|
"src/engine-library/readonlyClient.ts": {
|
|
1944
|
-
"bytes":
|
|
1944
|
+
"bytes": 3057,
|
|
1945
1945
|
"imports": [
|
|
1946
1946
|
{
|
|
1947
1947
|
"path": "src/engine-library/errors.ts",
|
|
@@ -2016,7 +2016,7 @@
|
|
|
2016
2016
|
"format": "esm"
|
|
2017
2017
|
},
|
|
2018
2018
|
"src/engine-library/statementGuard.ts": {
|
|
2019
|
-
"bytes":
|
|
2019
|
+
"bytes": 5179,
|
|
2020
2020
|
"imports": [
|
|
2021
2021
|
{
|
|
2022
2022
|
"path": "src/core/sql.ts",
|
|
@@ -2093,7 +2093,7 @@
|
|
|
2093
2093
|
"format": "esm"
|
|
2094
2094
|
},
|
|
2095
2095
|
"src/engine-library/query.ts": {
|
|
2096
|
-
"bytes":
|
|
2096
|
+
"bytes": 5015,
|
|
2097
2097
|
"imports": [
|
|
2098
2098
|
{
|
|
2099
2099
|
"path": "src/execute.ts",
|
|
@@ -2464,7 +2464,7 @@
|
|
|
2464
2464
|
"bytesInOutput": 412
|
|
2465
2465
|
},
|
|
2466
2466
|
"src/execute.ts": {
|
|
2467
|
-
"bytesInOutput":
|
|
2467
|
+
"bytesInOutput": 243740
|
|
2468
2468
|
},
|
|
2469
2469
|
"src/engine-library/errors.ts": {
|
|
2470
2470
|
"bytesInOutput": 1441
|
|
@@ -2488,7 +2488,7 @@
|
|
|
2488
2488
|
"bytesInOutput": 4313
|
|
2489
2489
|
},
|
|
2490
2490
|
"src/engine-library/readonlyClient.ts": {
|
|
2491
|
-
"bytesInOutput":
|
|
2491
|
+
"bytesInOutput": 1127
|
|
2492
2492
|
},
|
|
2493
2493
|
"src/engine-library/cursorScope.ts": {
|
|
2494
2494
|
"bytesInOutput": 766
|
|
@@ -2518,13 +2518,13 @@
|
|
|
2518
2518
|
"bytesInOutput": 1025
|
|
2519
2519
|
},
|
|
2520
2520
|
"src/engine-library/query.ts": {
|
|
2521
|
-
"bytesInOutput":
|
|
2521
|
+
"bytesInOutput": 1446
|
|
2522
2522
|
},
|
|
2523
2523
|
"src/engine-library/index.ts": {
|
|
2524
2524
|
"bytesInOutput": 16
|
|
2525
2525
|
}
|
|
2526
2526
|
},
|
|
2527
|
-
"bytes":
|
|
2527
|
+
"bytes": 688106
|
|
2528
2528
|
}
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
"format": "esm"
|
|
1447
1447
|
},
|
|
1448
1448
|
"src/execute.ts": {
|
|
1449
|
-
"bytes":
|
|
1449
|
+
"bytes": 632385,
|
|
1450
1450
|
"imports": [
|
|
1451
1451
|
{
|
|
1452
1452
|
"path": "src/lexer/lexer.ts",
|
|
@@ -1941,7 +1941,7 @@
|
|
|
1941
1941
|
"format": "esm"
|
|
1942
1942
|
},
|
|
1943
1943
|
"src/engine-library/readonlyClient.ts": {
|
|
1944
|
-
"bytes":
|
|
1944
|
+
"bytes": 3057,
|
|
1945
1945
|
"imports": [
|
|
1946
1946
|
{
|
|
1947
1947
|
"path": "src/engine-library/errors.ts",
|
|
@@ -2016,7 +2016,7 @@
|
|
|
2016
2016
|
"format": "esm"
|
|
2017
2017
|
},
|
|
2018
2018
|
"src/engine-library/statementGuard.ts": {
|
|
2019
|
-
"bytes":
|
|
2019
|
+
"bytes": 5179,
|
|
2020
2020
|
"imports": [
|
|
2021
2021
|
{
|
|
2022
2022
|
"path": "src/core/sql.ts",
|
|
@@ -2093,7 +2093,7 @@
|
|
|
2093
2093
|
"format": "esm"
|
|
2094
2094
|
},
|
|
2095
2095
|
"src/engine-library/query.ts": {
|
|
2096
|
-
"bytes":
|
|
2096
|
+
"bytes": 5015,
|
|
2097
2097
|
"imports": [
|
|
2098
2098
|
{
|
|
2099
2099
|
"path": "src/execute.ts",
|
|
@@ -2478,7 +2478,7 @@
|
|
|
2478
2478
|
"bytesInOutput": 412
|
|
2479
2479
|
},
|
|
2480
2480
|
"src/execute.ts": {
|
|
2481
|
-
"bytesInOutput":
|
|
2481
|
+
"bytesInOutput": 243740
|
|
2482
2482
|
},
|
|
2483
2483
|
"src/engine-library/errors.ts": {
|
|
2484
2484
|
"bytesInOutput": 1441
|
|
@@ -2502,7 +2502,7 @@
|
|
|
2502
2502
|
"bytesInOutput": 4313
|
|
2503
2503
|
},
|
|
2504
2504
|
"src/engine-library/readonlyClient.ts": {
|
|
2505
|
-
"bytesInOutput":
|
|
2505
|
+
"bytesInOutput": 1127
|
|
2506
2506
|
},
|
|
2507
2507
|
"src/engine-library/cursorScope.ts": {
|
|
2508
2508
|
"bytesInOutput": 766
|
|
@@ -2532,7 +2532,7 @@
|
|
|
2532
2532
|
"bytesInOutput": 1025
|
|
2533
2533
|
},
|
|
2534
2534
|
"src/engine-library/query.ts": {
|
|
2535
|
-
"bytesInOutput":
|
|
2535
|
+
"bytesInOutput": 1446
|
|
2536
2536
|
},
|
|
2537
2537
|
"src/engine-library/index.ts": {
|
|
2538
2538
|
"bytesInOutput": 16
|
|
@@ -2544,7 +2544,7 @@
|
|
|
2544
2544
|
"bytesInOutput": 127
|
|
2545
2545
|
}
|
|
2546
2546
|
},
|
|
2547
|
-
"bytes":
|
|
2547
|
+
"bytes": 689130
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
@@ -11,4 +11,4 @@ export declare function executeStatement(statement: Statement, context: Executio
|
|
|
11
11
|
export declare function disposeExecutionContext(context: ExecutionContext): Promise<void>;
|
|
12
12
|
export { isDmlResult } from "./publicTypes";
|
|
13
13
|
export { createKintoneClient, KsqlFlowError };
|
|
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";
|
|
14
|
+
export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowChunkWrittenInfo, FlowDeleteResult, FlowDmlResult, FlowInsertResult, FlowKintoneClient, KintoneNativeUpdateKey, KintoneNativeUpsertRecord, KintoneNativeUpsertParams, KintoneNativeUpsertRecordResult, KintoneNativeUpsertResult, FlowUpdateResult, FlowUpsertResult, ParseScriptOptions, ParseScriptResult, PreviewResult, PreviewSample, PreviewStatementOptions, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
|
|
@@ -41,6 +41,27 @@ export interface KintoneRecordValue {
|
|
|
41
41
|
}>;
|
|
42
42
|
}
|
|
43
43
|
export type KintoneRecord = Record<string, KintoneRecordValue>;
|
|
44
|
+
export interface KintoneNativeUpdateKey {
|
|
45
|
+
field: string;
|
|
46
|
+
value: string;
|
|
47
|
+
}
|
|
48
|
+
export interface KintoneNativeUpsertRecord {
|
|
49
|
+
updateKey: KintoneNativeUpdateKey;
|
|
50
|
+
record: KintoneRecord;
|
|
51
|
+
}
|
|
52
|
+
export interface KintoneNativeUpsertParams {
|
|
53
|
+
app: number;
|
|
54
|
+
upsert: true;
|
|
55
|
+
records: KintoneNativeUpsertRecord[];
|
|
56
|
+
}
|
|
57
|
+
export interface KintoneNativeUpsertRecordResult {
|
|
58
|
+
id: string;
|
|
59
|
+
revision: string;
|
|
60
|
+
operation: "INSERT" | "UPDATE";
|
|
61
|
+
}
|
|
62
|
+
export interface KintoneNativeUpsertResult {
|
|
63
|
+
records: KintoneNativeUpsertRecordResult[];
|
|
64
|
+
}
|
|
44
65
|
export interface FlowKintoneClient {
|
|
45
66
|
getRecords(params: {
|
|
46
67
|
app: number;
|
|
@@ -79,6 +100,7 @@ export interface FlowKintoneClient {
|
|
|
79
100
|
record: KintoneRecord;
|
|
80
101
|
}>;
|
|
81
102
|
}): Promise<void>;
|
|
103
|
+
upsertRecords?(params: KintoneNativeUpsertParams): Promise<KintoneNativeUpsertResult>;
|
|
82
104
|
deleteRecords(params: {
|
|
83
105
|
app: number;
|
|
84
106
|
ids: number[];
|
|
@@ -122,6 +144,8 @@ export interface ValidateScriptOptions extends ParseScriptOptions {
|
|
|
122
144
|
}
|
|
123
145
|
export interface ExplainScriptOptions extends ParseScriptOptions {
|
|
124
146
|
client: FlowKintoneClient;
|
|
147
|
+
/** /flow 本実行を想定する native UPSERT 設定。省略時は有効、false は opt-out。 */
|
|
148
|
+
enableNativeUpsert?: boolean;
|
|
125
149
|
variables?: Readonly<Record<string, string>>;
|
|
126
150
|
/** dialect 1 の @ 付き時刻関数が共有する explain 呼出し単位の基準時刻。 */
|
|
127
151
|
asOf?: Date;
|
|
@@ -165,6 +189,8 @@ export interface CreateExecutionContextOptions extends ParseScriptOptions {
|
|
|
165
189
|
asOf?: Date;
|
|
166
190
|
timezone?: string;
|
|
167
191
|
continueOnError?: boolean;
|
|
192
|
+
/** 素の UPSERT で native UPSERT を許可する。省略時は true。 */
|
|
193
|
+
enableNativeUpsert?: boolean;
|
|
168
194
|
/**
|
|
169
195
|
* 書込 API の各成功直後に await される。順序は現在の書込順であり、キー順は保証しない。
|
|
170
196
|
* コールバックが throw した場合、その文は error になるが、通知対象チャンクは書込済み。
|
|
@@ -176,12 +202,14 @@ export interface FlowChunkWrittenInfo {
|
|
|
176
202
|
statementIndex: number;
|
|
177
203
|
/** 書込 API に渡される物理アプリ ID(LAPP は解決済み)。 */
|
|
178
204
|
appId: number;
|
|
179
|
-
operation: "INSERT" | "UPDATE" | "DELETE";
|
|
205
|
+
operation: "INSERT" | "UPDATE" | "DELETE" | "UPSERT";
|
|
180
206
|
records: number;
|
|
181
207
|
/** その文で成功した書込 API リクエストの index(0 始まり)。 */
|
|
182
208
|
chunkIndex: number;
|
|
183
209
|
/** 単一キー UPSERT でキー値を payload から特定できる場合のみ設定される。 */
|
|
184
210
|
lastKeyValue?: string;
|
|
211
|
+
insertedCount?: number;
|
|
212
|
+
updatedCount?: number;
|
|
185
213
|
}
|
|
186
214
|
declare const executionContextBrand: unique symbol;
|
|
187
215
|
/** Opaque, sequential-only statement execution handle. */
|
|
@@ -197,6 +225,8 @@ export interface ExecutionMetrics {
|
|
|
197
225
|
getCalls: number;
|
|
198
226
|
postCalls: number;
|
|
199
227
|
putCalls: number;
|
|
228
|
+
/** upsertRecords の呼出し回数。putCalls の内数。 */
|
|
229
|
+
nativeUpsertCalls: number;
|
|
200
230
|
deleteCalls: number;
|
|
201
231
|
fieldCalls: number;
|
|
202
232
|
numberPrecisionCalls: number;
|