@rex0220/kintone-sql-tools 3.64.0 → 3.65.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-08T09:47:11.777Z",
2
+ "generatedAt": "2026-08-08T11:23:52.741Z",
3
3
  "baseline": "B66 Phase1 initial measured values; no arbitrary size ceiling",
4
4
  "bundles": {
5
5
  "index.cjs": {
6
6
  "inputCount": 110,
7
- "minifiedBytes": 630484,
8
- "gzipBytes": 171894,
7
+ "minifiedBytes": 631480,
8
+ "gzipBytes": 172210,
9
9
  "forbidden": {
10
10
  "mcp-instructions": [],
11
11
  "src-mcp": [],
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "index.mjs": {
26
26
  "inputCount": 110,
27
- "minifiedBytes": 629939,
28
- "gzipBytes": 171613,
27
+ "minifiedBytes": 630935,
28
+ "gzipBytes": 171927,
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": 112,
47
- "minifiedBytes": 630963,
48
- "gzipBytes": 171966,
47
+ "minifiedBytes": 631959,
48
+ "gzipBytes": 172272,
49
49
  "forbidden": {
50
50
  "mcp-instructions": [],
51
51
  "src-mcp": [],
@@ -556,7 +556,7 @@
556
556
  "format": "esm"
557
557
  },
558
558
  "src/engine/evalWhere.ts": {
559
- "bytes": 20132,
559
+ "bytes": 20290,
560
560
  "imports": [
561
561
  {
562
562
  "path": "src/types/ast.ts",
@@ -1078,7 +1078,7 @@
1078
1078
  "format": "esm"
1079
1079
  },
1080
1080
  "src/engine/process.ts": {
1081
- "bytes": 83607,
1081
+ "bytes": 85046,
1082
1082
  "imports": [
1083
1083
  {
1084
1084
  "path": "src/core/optimization/crossJoinRowPlan.ts",
@@ -1363,7 +1363,7 @@
1363
1363
  "format": "esm"
1364
1364
  },
1365
1365
  "src/execute.ts": {
1366
- "bytes": 543394,
1366
+ "bytes": 544070,
1367
1367
  "imports": [
1368
1368
  {
1369
1369
  "path": "src/lexer/lexer.ts",
@@ -2204,7 +2204,7 @@
2204
2204
  "bytesInOutput": 11516
2205
2205
  },
2206
2206
  "src/engine/evalWhere.ts": {
2207
- "bytesInOutput": 6040
2207
+ "bytesInOutput": 6121
2208
2208
  },
2209
2209
  "src/core/dmlCustomCheck.ts": {
2210
2210
  "bytesInOutput": 1251
@@ -2300,7 +2300,7 @@
2300
2300
  "bytesInOutput": 1223
2301
2301
  },
2302
2302
  "src/engine/process.ts": {
2303
- "bytesInOutput": 26210
2303
+ "bytesInOutput": 26917
2304
2304
  },
2305
2305
  "src/converter/subtableAdapter.ts": {
2306
2306
  "bytesInOutput": 643
@@ -2360,7 +2360,7 @@
2360
2360
  "bytesInOutput": 412
2361
2361
  },
2362
2362
  "src/execute.ts": {
2363
- "bytesInOutput": 217749
2363
+ "bytesInOutput": 217957
2364
2364
  },
2365
2365
  "src/engine-library/errors.ts": {
2366
2366
  "bytesInOutput": 1441
@@ -2420,7 +2420,7 @@
2420
2420
  "bytesInOutput": 1271
2421
2421
  }
2422
2422
  },
2423
- "bytes": 630484
2423
+ "bytes": 631480
2424
2424
  }
2425
2425
  }
2426
2426
  }
@@ -556,7 +556,7 @@
556
556
  "format": "esm"
557
557
  },
558
558
  "src/engine/evalWhere.ts": {
559
- "bytes": 20132,
559
+ "bytes": 20290,
560
560
  "imports": [
561
561
  {
562
562
  "path": "src/types/ast.ts",
@@ -1078,7 +1078,7 @@
1078
1078
  "format": "esm"
1079
1079
  },
1080
1080
  "src/engine/process.ts": {
1081
- "bytes": 83607,
1081
+ "bytes": 85046,
1082
1082
  "imports": [
1083
1083
  {
1084
1084
  "path": "src/core/optimization/crossJoinRowPlan.ts",
@@ -1363,7 +1363,7 @@
1363
1363
  "format": "esm"
1364
1364
  },
1365
1365
  "src/execute.ts": {
1366
- "bytes": 543394,
1366
+ "bytes": 544070,
1367
1367
  "imports": [
1368
1368
  {
1369
1369
  "path": "src/lexer/lexer.ts",
@@ -2208,7 +2208,7 @@
2208
2208
  "bytesInOutput": 11516
2209
2209
  },
2210
2210
  "src/engine/evalWhere.ts": {
2211
- "bytesInOutput": 6040
2211
+ "bytesInOutput": 6121
2212
2212
  },
2213
2213
  "src/core/dmlCustomCheck.ts": {
2214
2214
  "bytesInOutput": 1251
@@ -2304,7 +2304,7 @@
2304
2304
  "bytesInOutput": 1223
2305
2305
  },
2306
2306
  "src/engine/process.ts": {
2307
- "bytesInOutput": 26210
2307
+ "bytesInOutput": 26917
2308
2308
  },
2309
2309
  "src/converter/subtableAdapter.ts": {
2310
2310
  "bytesInOutput": 643
@@ -2364,7 +2364,7 @@
2364
2364
  "bytesInOutput": 412
2365
2365
  },
2366
2366
  "src/execute.ts": {
2367
- "bytesInOutput": 217749
2367
+ "bytesInOutput": 217957
2368
2368
  },
2369
2369
  "src/engine-library/errors.ts": {
2370
2370
  "bytesInOutput": 1441
@@ -2427,7 +2427,7 @@
2427
2427
  "bytesInOutput": 16
2428
2428
  }
2429
2429
  },
2430
- "bytes": 629939
2430
+ "bytes": 630935
2431
2431
  }
2432
2432
  }
2433
2433
  }
@@ -556,7 +556,7 @@
556
556
  "format": "esm"
557
557
  },
558
558
  "src/engine/evalWhere.ts": {
559
- "bytes": 20132,
559
+ "bytes": 20290,
560
560
  "imports": [
561
561
  {
562
562
  "path": "src/types/ast.ts",
@@ -1078,7 +1078,7 @@
1078
1078
  "format": "esm"
1079
1079
  },
1080
1080
  "src/engine/process.ts": {
1081
- "bytes": 83607,
1081
+ "bytes": 85046,
1082
1082
  "imports": [
1083
1083
  {
1084
1084
  "path": "src/core/optimization/crossJoinRowPlan.ts",
@@ -1363,7 +1363,7 @@
1363
1363
  "format": "esm"
1364
1364
  },
1365
1365
  "src/execute.ts": {
1366
- "bytes": 543394,
1366
+ "bytes": 544070,
1367
1367
  "imports": [
1368
1368
  {
1369
1369
  "path": "src/lexer/lexer.ts",
@@ -2222,7 +2222,7 @@
2222
2222
  "bytesInOutput": 11516
2223
2223
  },
2224
2224
  "src/engine/evalWhere.ts": {
2225
- "bytesInOutput": 6040
2225
+ "bytesInOutput": 6121
2226
2226
  },
2227
2227
  "src/core/dmlCustomCheck.ts": {
2228
2228
  "bytesInOutput": 1251
@@ -2318,7 +2318,7 @@
2318
2318
  "bytesInOutput": 1223
2319
2319
  },
2320
2320
  "src/engine/process.ts": {
2321
- "bytesInOutput": 26210
2321
+ "bytesInOutput": 26917
2322
2322
  },
2323
2323
  "src/converter/subtableAdapter.ts": {
2324
2324
  "bytesInOutput": 643
@@ -2378,7 +2378,7 @@
2378
2378
  "bytesInOutput": 412
2379
2379
  },
2380
2380
  "src/execute.ts": {
2381
- "bytesInOutput": 217749
2381
+ "bytesInOutput": 217957
2382
2382
  },
2383
2383
  "src/engine-library/errors.ts": {
2384
2384
  "bytesInOutput": 1441
@@ -2447,7 +2447,7 @@
2447
2447
  "bytesInOutput": 127
2448
2448
  }
2449
2449
  },
2450
- "bytes": 630963
2450
+ "bytes": 631959
2451
2451
  }
2452
2452
  }
2453
2453
  }
@@ -29764,7 +29764,7 @@ var import_docsResourceBuilder = __toESM(require_docsResourceBuilder());
29764
29764
 
29765
29765
  // src/mcp/serverVersion.ts
29766
29766
  init_define_KSQL_DOCS();
29767
- var SERVER_VERSION = true ? "3.64.0" : "0.0.0-dev";
29767
+ var SERVER_VERSION = true ? "3.65.0" : "0.0.0-dev";
29768
29768
 
29769
29769
  // src/mcp/docsResources.ts
29770
29770
  function loadFromRepoDocs() {
@@ -39966,6 +39966,10 @@ function resolveField(field, row, resolveFieldType, resolveFieldSemantics2) {
39966
39966
  if (field.type === "ARITH_FIELD") return String(evalArithExpr(field.expr, row));
39967
39967
  if (field.type === "CASE_FIELD") return evalCaseWhen(field.expr, row, resolveFieldType, resolveFieldSemantics2);
39968
39968
  if (field.type === "GROUPING_FIELD") return evalGroupingRef(field.ref, row);
39969
+ if (field.aggregateRef) {
39970
+ const ref = field.aggregateRef;
39971
+ return resolveFieldRef(row, aggregateSyntheticName(ref.func, ref.distinct, ref.arg));
39972
+ }
39969
39973
  const key = field.tableAlias ? `${field.tableAlias}.${field.field}` : field.field;
39970
39974
  return resolveFieldRef(row, key);
39971
39975
  }
@@ -44129,6 +44133,7 @@ async function deriveEmptyWildcardColumns(fields, subtableCode, loadProcessStatu
44129
44133
  init_define_KSQL_DOCS();
44130
44134
  var materializedSelectValues = /* @__PURE__ */ new WeakMap();
44131
44135
  var sourceRows = /* @__PURE__ */ new WeakMap();
44136
+ var UNRESOLVED_AGGREGATE_COMPARISON_WARNING = "\u6BD4\u8F03\u6761\u4EF6\u3067\u53C2\u7167\u3057\u305F\u96C6\u8A08\u5024\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3002SELECT \u30EA\u30B9\u30C8\u306B\u540C\u3058\u96C6\u8A08\u5F0F\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002";
44132
44137
  function asProcessingRow(source) {
44133
44138
  if (sourceRows.has(source)) return source;
44134
44139
  let row;
@@ -44177,6 +44182,31 @@ function getMaterializedLookupValue(row, key) {
44177
44182
  function getLegacyMaterializedValue(row, key) {
44178
44183
  return materializedSelectValues.has(row) ? void 0 : row[key];
44179
44184
  }
44185
+ function warnOnUnresolvedAggregateComparisons(node, rows, warnings) {
44186
+ if (!warnings || rows.length === 0) return;
44187
+ const keys = /* @__PURE__ */ new Set();
44188
+ const visit = (value) => {
44189
+ if (value === null || typeof value !== "object") return;
44190
+ if (Array.isArray(value)) {
44191
+ value.forEach(visit);
44192
+ return;
44193
+ }
44194
+ const record2 = value;
44195
+ if (record2["type"] === "FIELD" && record2["aggregateRef"] !== void 0) {
44196
+ const ref = record2["aggregateRef"];
44197
+ keys.add(aggregateSyntheticName(ref.func, ref.distinct, ref.arg));
44198
+ return;
44199
+ }
44200
+ if (record2["type"] === "SELECT" || record2["type"] === "SCALAR_SUBQUERY") return;
44201
+ Object.values(record2).forEach(visit);
44202
+ };
44203
+ visit(node);
44204
+ if ([...keys].some((key) => rows.some(
44205
+ (row) => getMaterializedLookupValue(row, key) === void 0 && row[key] === void 0
44206
+ ))) {
44207
+ warnings.add(UNRESOLVED_AGGREGATE_COMPARISON_WARNING);
44208
+ }
44209
+ }
44180
44210
  function havingEvaluationRow(row) {
44181
44211
  const lookups = materializedSelectValues.get(row)?.byLookupKey;
44182
44212
  if (!lookups || lookups.size === 0) return row;
@@ -45481,7 +45511,8 @@ function runFullScan(input) {
45481
45511
  tableColumns,
45482
45512
  hiddenQualifiedAliases,
45483
45513
  resolvedGroupingSpec,
45484
- plainGroupByPlan
45514
+ plainGroupByPlan,
45515
+ warnings
45485
45516
  } = input;
45486
45517
  const effectiveOrderSemantics = deriveOutputOrderSemantics(stmt.columns, aggregateSortKindResolver);
45487
45518
  for (const [key, value] of orderSemantics ?? []) effectiveOrderSemantics.set(key, value);
@@ -45537,7 +45568,9 @@ function runFullScan(input) {
45537
45568
  }
45538
45569
  );
45539
45570
  }
45571
+ warnOnUnresolvedAggregateComparisons(stmt.columns, rows, warnings);
45540
45572
  const resolveHavingSemantics = (field) => field.aggregateRef ? aggregateResultSemantics(field.aggregateRef, aggregateSortKindResolver) : havingFieldSemanticsResolver?.(field);
45573
+ warnOnUnresolvedAggregateComparisons(stmt.having, rows, warnings);
45541
45574
  rows = applyHaving(rows, stmt.having, havingFieldTypeResolver, resolveHavingSemantics);
45542
45575
  rows = applyWindow(
45543
45576
  rows,
@@ -48858,6 +48891,7 @@ async function assertDmlWhereCapability(stmt, client, cacheContext) {
48858
48891
  }
48859
48892
  async function executeSelect(stmt, client, options, cacheContext, cteCache, captureColumnMeta = false, forLibraryCapture = false, windowWarningContext = "DIRECT") {
48860
48893
  let result;
48894
+ const subqueryWarnings = /* @__PURE__ */ new Set();
48861
48895
  await validateSelectGroupingPlanning(stmt, client, cacheContext, cteCache);
48862
48896
  if (isNoFromSelect(stmt)) {
48863
48897
  result = executeNoFromSelect(stmt);
@@ -48887,7 +48921,7 @@ async function executeSelect(stmt, client, options, cacheContext, cteCache, capt
48887
48921
  cacheContext,
48888
48922
  cteCache
48889
48923
  );
48890
- await resolveSelectCaseSubqueries(stmt, client, options, cacheContext, cteCache);
48924
+ await resolveSelectCaseSubqueries(stmt, client, options, cacheContext, subqueryWarnings, cteCache);
48891
48925
  const whereCapability = rememberSelectWhereCapability(
48892
48926
  stmt,
48893
48927
  classifyWhereCapability(stmt.where, fieldSemanticsResolver)
@@ -48978,7 +49012,11 @@ async function executeSelect(stmt, client, options, cacheContext, cteCache, capt
48978
49012
  await inferSelectColumnMeta(stmt, result.columns, client, cacheContext, cteCache, forLibraryCapture)
48979
49013
  );
48980
49014
  }
48981
- return mergeSelectWarnings(result, [...defaultRangeWarnings, ...subtableFieldWarnings]);
49015
+ return mergeSelectWarnings(result, [
49016
+ ...subqueryWarnings,
49017
+ ...defaultRangeWarnings,
49018
+ ...subtableFieldWarnings
49019
+ ]);
48982
49020
  }
48983
49021
  function subtableGroupingAdvice(fieldName, owners) {
48984
49022
  if (owners.length === 1) {
@@ -50446,8 +50484,8 @@ async function executeFullScanSelect(stmt, client, options, cacheContext, cteCac
50446
50484
  const warnings = /* @__PURE__ */ new Set();
50447
50485
  const parallel = options.fetchParallel ?? 1;
50448
50486
  await Promise.all([
50449
- resolveSubqueries(stmt.where, client, options, cacheContext, cteCache),
50450
- resolveSubqueries(stmt.having, client, options, cacheContext, cteCache)
50487
+ resolveSubqueries(stmt.where, client, options, cacheContext, warnings, cteCache),
50488
+ resolveSubqueries(stmt.having, client, options, cacheContext, warnings, cteCache)
50451
50489
  ]);
50452
50490
  const [pushdownMeta, typedInFieldTypes, aggregateSortKindResolver] = await Promise.all([
50453
50491
  loadTypedPushdownMeta(stmt, client, cacheContext),
@@ -50481,7 +50519,14 @@ async function executeFullScanSelect(stmt, client, options, cacheContext, cteCac
50481
50519
  const mainBoundQuery = boundServerFunctionPlan?.queriesByAlias.get(
50482
50520
  stmt.from.alias
50483
50521
  ) ?? "";
50484
- const scalarCache = await resolveScalarColumns(stmt.columns, client, options, cacheContext, cteCache);
50522
+ const scalarCache = await resolveScalarColumns(
50523
+ stmt.columns,
50524
+ client,
50525
+ options,
50526
+ cacheContext,
50527
+ warnings,
50528
+ cteCache
50529
+ );
50485
50530
  const constantFalse = isConstantFalseWhere(stmt.where);
50486
50531
  const mainFetch = constantFalse ? Promise.resolve([]) : fetchTableRecordsForFullScan(
50487
50532
  stmt,
@@ -50585,7 +50630,8 @@ async function executeFullScanSelect(stmt, client, options, cacheContext, cteCac
50585
50630
  appliedKlikes: prefilterPlan?.appliedKlikes ?? pushdownPlan.appliedKlikes,
50586
50631
  ...prefilterPlan ? { residualWhere: prefilterPlan.residualWhere } : boundServerFunctionPlan ? { residualWhere: boundServerFunctionPlan.joinPlan.residualWhere } : {},
50587
50632
  resolvedGroupingSpec: resolvedGroupingSpecs.get(stmt),
50588
- plainGroupByPlan
50633
+ plainGroupByPlan,
50634
+ warnings
50589
50635
  });
50590
50636
  const columns = await restoreEmptyWildcardColumns(
50591
50637
  stmt,
@@ -50852,9 +50898,9 @@ async function executeFullScanWithCte(stmt, client, options, cteCache, cacheCont
50852
50898
  const warnings = /* @__PURE__ */ new Set();
50853
50899
  const parallel = options.fetchParallel ?? 1;
50854
50900
  await Promise.all([
50855
- resolveSubqueries(stmt.where, client, options, cacheContext, cteCache),
50856
- resolveSubqueries(stmt.having, client, options, cacheContext, cteCache),
50857
- resolveSelectCaseSubqueries(stmt, client, options, cacheContext, cteCache)
50901
+ resolveSubqueries(stmt.where, client, options, cacheContext, warnings, cteCache),
50902
+ resolveSubqueries(stmt.having, client, options, cacheContext, warnings, cteCache),
50903
+ resolveSelectCaseSubqueries(stmt, client, options, cacheContext, warnings, cteCache)
50858
50904
  ]);
50859
50905
  const whereCapability = classifyWhereCapability(stmt.where, choiceAndWindowResolver);
50860
50906
  if (whereCapability.capability === "UNSUPPORTED") {
@@ -50894,6 +50940,7 @@ async function executeFullScanWithCte(stmt, client, options, cteCache, cacheCont
50894
50940
  client,
50895
50941
  effectiveOptions,
50896
50942
  cacheContext,
50943
+ warnings,
50897
50944
  cteCache
50898
50945
  );
50899
50946
  const orderByMetaPromise = Promise.resolve(orderMeta);
@@ -54357,17 +54404,17 @@ function parseSql(sql, enableImport = false) {
54357
54404
  throw e;
54358
54405
  }
54359
54406
  }
54360
- async function resolveSubqueries(where, client, options, cacheContext, cteCache) {
54407
+ async function resolveSubqueries(where, client, options, cacheContext, warnings, cteCache) {
54361
54408
  const tasks = [];
54362
- collectSubqueryTasks(where, client, options, cacheContext, tasks, cteCache);
54409
+ collectSubqueryTasks(where, client, options, cacheContext, tasks, warnings, cteCache);
54363
54410
  await Promise.all(tasks);
54364
54411
  }
54365
- async function resolveSelectCaseSubqueries(stmt, client, options, cacheContext, cteCache) {
54412
+ async function resolveSelectCaseSubqueries(stmt, client, options, cacheContext, warnings, cteCache) {
54366
54413
  const tasks = [];
54367
54414
  for (const column of stmt.columns) {
54368
54415
  if (column.type !== "CASE_COL") continue;
54369
54416
  for (const branch of column.expr.branches) {
54370
- tasks.push(resolveSubqueries(branch.condition, client, options, cacheContext, cteCache));
54417
+ tasks.push(resolveSubqueries(branch.condition, client, options, cacheContext, warnings, cteCache));
54371
54418
  }
54372
54419
  }
54373
54420
  await Promise.all(tasks);
@@ -54378,19 +54425,21 @@ function runSubquery(query, client, options, cacheContext, cteCache) {
54378
54425
  }
54379
54426
  return executeSelect(query, client, options, cacheContext);
54380
54427
  }
54381
- function collectSubqueryTasks(where, client, options, cacheContext, tasks, cteCache) {
54428
+ function collectSubqueryTasks(where, client, options, cacheContext, tasks, warnings, cteCache) {
54382
54429
  if (where === null) return;
54383
54430
  switch (where.type) {
54384
54431
  case "BINARY": {
54385
54432
  const right = where.right;
54386
54433
  if (right.type === "SUBQUERY_IN_LIST") {
54387
54434
  tasks.push(runSubquery(right.query, client, options, cacheContext, cteCache).then((result) => {
54435
+ for (const warning of result.warnings ?? []) warnings.add(warning);
54388
54436
  const col = right.column ?? (result.columns[0] ?? "");
54389
54437
  right.resolved = new Set(result.rows.map((r) => r[col] ?? ""));
54390
54438
  }));
54391
54439
  }
54392
54440
  if (right.type === "SCALAR_SUBQUERY") {
54393
54441
  tasks.push(runSubquery(right.query, client, options, cacheContext, cteCache).then((result) => {
54442
+ for (const warning of result.warnings ?? []) warnings.add(warning);
54394
54443
  if (result.rowCount === 0) throw new Error("\u30B9\u30AB\u30E9\u30FC\u30B5\u30D6\u30AF\u30A8\u30EA\u304C\u5024\u3092\u8FD4\u3057\u307E\u305B\u3093\u3067\u3057\u305F");
54395
54444
  if (result.rowCount > 1) throw new Error("\u30B9\u30AB\u30E9\u30FC\u30B5\u30D6\u30AF\u30A8\u30EA\u304C\u8907\u6570\u884C\u3092\u8FD4\u3057\u307E\u3057\u305F\uFF081\u884C\u306E\u307F\u8A31\u53EF\uFF09");
54396
54445
  const col = result.columns[0] ?? "";
@@ -54400,16 +54449,17 @@ function collectSubqueryTasks(where, client, options, cacheContext, tasks, cteCa
54400
54449
  break;
54401
54450
  }
54402
54451
  case "LOGICAL":
54403
- collectSubqueryTasks(where.left, client, options, cacheContext, tasks, cteCache);
54404
- collectSubqueryTasks(where.right, client, options, cacheContext, tasks, cteCache);
54452
+ collectSubqueryTasks(where.left, client, options, cacheContext, tasks, warnings, cteCache);
54453
+ collectSubqueryTasks(where.right, client, options, cacheContext, tasks, warnings, cteCache);
54405
54454
  break;
54406
54455
  case "NOT":
54407
54456
  case "GROUP":
54408
- collectSubqueryTasks(where.expr, client, options, cacheContext, tasks, cteCache);
54457
+ collectSubqueryTasks(where.expr, client, options, cacheContext, tasks, warnings, cteCache);
54409
54458
  break;
54410
54459
  case "EXISTS": {
54411
54460
  const node = where;
54412
54461
  tasks.push(runSubquery(node.query, client, options, cacheContext, cteCache).then((result) => {
54462
+ for (const warning of result.warnings ?? []) warnings.add(warning);
54413
54463
  node.resolved = result.rowCount > 0;
54414
54464
  }));
54415
54465
  break;
@@ -54429,7 +54479,7 @@ async function resolveSetSubqueries(assignments, client, options, cacheContext)
54429
54479
  a.value = { type: "STRING", value: resolved };
54430
54480
  }
54431
54481
  }
54432
- async function resolveScalarColumns(columns, client, options, cacheContext, cteCache) {
54482
+ async function resolveScalarColumns(columns, client, options, cacheContext, warnings, cteCache) {
54433
54483
  const byQuery = /* @__PURE__ */ new Map();
54434
54484
  const pending = [];
54435
54485
  for (let i = 0; i < columns.length; i++) {
@@ -54439,6 +54489,7 @@ async function resolveScalarColumns(columns, client, options, cacheContext, cteC
54439
54489
  let promise2 = byQuery.get(key);
54440
54490
  if (!promise2) {
54441
54491
  promise2 = runSubquery(col.query, client, options, cacheContext, cteCache).then((result) => {
54492
+ for (const warning of result.warnings ?? []) warnings.add(warning);
54442
54493
  if (result.rowCount === 0) throw new Error("\u30B9\u30AB\u30E9\u30FC\u30B5\u30D6\u30AF\u30A8\u30EA\u304C\u5024\u3092\u8FD4\u3057\u307E\u305B\u3093\u3067\u3057\u305F");
54443
54494
  if (result.rowCount > 1) throw new Error("\u30B9\u30AB\u30E9\u30FC\u30B5\u30D6\u30AF\u30A8\u30EA\u304C\u8907\u6570\u884C\u3092\u8FD4\u3057\u307E\u3057\u305F\uFF081\u884C\u306E\u307F\u8A31\u53EF\uFF09");
54444
54495
  const firstCol = result.columns[0] ?? "";
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rex0220/kintone-sql-tools",
3
- "version": "3.64.0",
3
+ "version": "3.65.0",
4
4
  "description": "kintone SQL plugin, CLI, and MCP tools (ksql)",
5
5
  "publishConfig": {
6
6
  "access": "public"