@rex0220/kintone-sql-tools 3.82.0 → 3.84.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.
@@ -236,7 +236,7 @@
236
236
  "format": "esm"
237
237
  },
238
238
  "src/core/groupingValidation.ts": {
239
- "bytes": 11186,
239
+ "bytes": 11431,
240
240
  "imports": [
241
241
  {
242
242
  "path": "src/core/grouping.ts",
@@ -257,7 +257,7 @@
257
257
  "format": "esm"
258
258
  },
259
259
  "src/converter/selectToKintone.ts": {
260
- "bytes": 32606,
260
+ "bytes": 32855,
261
261
  "imports": [
262
262
  {
263
263
  "path": "../types/ast",
@@ -1538,7 +1538,7 @@
1538
1538
  "format": "esm"
1539
1539
  },
1540
1540
  "src/execute.ts": {
1541
- "bytes": 657418,
1541
+ "bytes": 657594,
1542
1542
  "imports": [
1543
1543
  {
1544
1544
  "path": "src/lexer/lexer.ts",
@@ -2299,10 +2299,10 @@
2299
2299
  "bytesInOutput": 8607
2300
2300
  },
2301
2301
  "src/core/groupingValidation.ts": {
2302
- "bytesInOutput": 3596
2302
+ "bytesInOutput": 3647
2303
2303
  },
2304
2304
  "src/converter/selectToKintone.ts": {
2305
- "bytesInOutput": 10890
2305
+ "bytesInOutput": 10918
2306
2306
  },
2307
2307
  "src/core/cteInlining.ts": {
2308
2308
  "bytesInOutput": 1164
@@ -2533,7 +2533,7 @@
2533
2533
  "bytesInOutput": 412
2534
2534
  },
2535
2535
  "src/execute.ts": {
2536
- "bytesInOutput": 257831
2536
+ "bytesInOutput": 257891
2537
2537
  },
2538
2538
  "src/api/cursorLeaseManager.ts": {
2539
2539
  "bytesInOutput": 1777
@@ -2587,7 +2587,7 @@
2587
2587
  "bytesInOutput": 1593
2588
2588
  }
2589
2589
  },
2590
- "bytes": 719574
2590
+ "bytes": 719713
2591
2591
  }
2592
2592
  }
2593
2593
  }
@@ -236,7 +236,7 @@
236
236
  "format": "esm"
237
237
  },
238
238
  "src/core/groupingValidation.ts": {
239
- "bytes": 11186,
239
+ "bytes": 11431,
240
240
  "imports": [
241
241
  {
242
242
  "path": "src/core/grouping.ts",
@@ -257,7 +257,7 @@
257
257
  "format": "esm"
258
258
  },
259
259
  "src/converter/selectToKintone.ts": {
260
- "bytes": 32606,
260
+ "bytes": 32855,
261
261
  "imports": [
262
262
  {
263
263
  "path": "../types/ast",
@@ -1538,7 +1538,7 @@
1538
1538
  "format": "esm"
1539
1539
  },
1540
1540
  "src/execute.ts": {
1541
- "bytes": 657418,
1541
+ "bytes": 657594,
1542
1542
  "imports": [
1543
1543
  {
1544
1544
  "path": "src/lexer/lexer.ts",
@@ -2314,10 +2314,10 @@
2314
2314
  "bytesInOutput": 8607
2315
2315
  },
2316
2316
  "src/core/groupingValidation.ts": {
2317
- "bytesInOutput": 3596
2317
+ "bytesInOutput": 3647
2318
2318
  },
2319
2319
  "src/converter/selectToKintone.ts": {
2320
- "bytesInOutput": 10890
2320
+ "bytesInOutput": 10918
2321
2321
  },
2322
2322
  "src/core/cteInlining.ts": {
2323
2323
  "bytesInOutput": 1164
@@ -2548,7 +2548,7 @@
2548
2548
  "bytesInOutput": 412
2549
2549
  },
2550
2550
  "src/execute.ts": {
2551
- "bytesInOutput": 257831
2551
+ "bytesInOutput": 257891
2552
2552
  },
2553
2553
  "src/api/cursorLeaseManager.ts": {
2554
2554
  "bytesInOutput": 1777
@@ -2605,7 +2605,7 @@
2605
2605
  "bytesInOutput": 1593
2606
2606
  }
2607
2607
  },
2608
- "bytes": 718788
2608
+ "bytes": 718927
2609
2609
  }
2610
2610
  }
2611
2611
  }
@@ -29765,7 +29765,7 @@ var import_docsResourceBuilder = __toESM(require_docsResourceBuilder());
29765
29765
 
29766
29766
  // src/mcp/serverVersion.ts
29767
29767
  init_define_KSQL_DOCS();
29768
- var SERVER_VERSION = true ? "3.82.0" : "0.0.0-dev";
29768
+ var SERVER_VERSION = true ? "3.84.0" : "0.0.0-dev";
29769
29769
 
29770
29770
  // src/mcp/docsResources.ts
29771
29771
  function loadFromRepoDocs() {
@@ -37035,8 +37035,9 @@ function validateGroupingRefMembership(ref, resolve3, canonicalItems) {
37035
37035
  }
37036
37036
  function validateGroupingStatic(stmt) {
37037
37037
  const normalized = normalizeGroupingSpec(stmt);
37038
+ const projectedColumns = [...stmt.columns, ...stmt.hiddenWindows ?? []];
37038
37039
  const groupingRefs = [];
37039
- for (const column of stmt.columns) {
37040
+ for (const column of projectedColumns) {
37040
37041
  collectGroupingRefs(column, groupingRefs);
37041
37042
  }
37042
37043
  collectGroupingRefs(stmt.having, groupingRefs);
@@ -37044,7 +37045,7 @@ function validateGroupingStatic(stmt) {
37044
37045
  const forbiddenGroupingRefs = [];
37045
37046
  collectGroupingRefs(stmt.where, forbiddenGroupingRefs);
37046
37047
  collectGroupingRefs(stmt.joins, forbiddenGroupingRefs);
37047
- collectAggregateArgumentGroupingRefs(stmt.columns, forbiddenGroupingRefs);
37048
+ collectAggregateArgumentGroupingRefs(projectedColumns, forbiddenGroupingRefs);
37048
37049
  collectAggregateArgumentGroupingRefs(stmt.having, forbiddenGroupingRefs);
37049
37050
  if (forbiddenGroupingRefs.length > 0) {
37050
37051
  throw new Error(
@@ -37073,7 +37074,7 @@ function validateGroupingPlanning(stmt, resolve3, planningGuardHook = () => void
37073
37074
  validateGroupingStatic(stmt);
37074
37075
  const normalized = normalizeGroupingSpec(stmt);
37075
37076
  const groupingRefs = [];
37076
- for (const column of stmt.columns) {
37077
+ for (const column of [...stmt.columns, ...stmt.hiddenWindows ?? []]) {
37077
37078
  collectGroupingRefs(column, groupingRefs);
37078
37079
  }
37079
37080
  collectGroupingRefs(stmt.having, groupingRefs);
@@ -37574,6 +37575,7 @@ function collectRequiredFieldsByTable(stmt, plainGroupByPlan, sourceAware) {
37574
37575
  };
37575
37576
  const walkFieldValue = (fv, phase = "select") => {
37576
37577
  if (fv.type === "FIELD") {
37578
+ if (fv.hiddenWindowRef) return;
37577
37579
  if (fv.aggregateRef) {
37578
37580
  walkAgg(fv.aggregateRef, phase);
37579
37581
  return;
@@ -51232,7 +51234,7 @@ async function buildGroupingFieldResolver(stmt, client, cacheContext, materializ
51232
51234
  async function validateSelectGroupingPlanning(stmt, client, cacheContext, materializedTables) {
51233
51235
  resolvedGroupingSpecs.delete(stmt);
51234
51236
  const normalized = normalizeGroupingSpec(stmt);
51235
- const hasGroupingNodes = JSON.stringify(stmt.columns).includes('"GROUPING_') || JSON.stringify(stmt.orderBy).includes('"GROUPING_');
51237
+ const hasGroupingNodes = JSON.stringify(stmt.columns).includes('"GROUPING_') || JSON.stringify(stmt.hiddenWindows ?? []).includes('"GROUPING_') || JSON.stringify(stmt.orderBy).includes('"GROUPING_');
51236
51238
  if (normalized.type === "GROUPING_SETS" || hasGroupingNodes) {
51237
51239
  const resolver = await buildGroupingFieldResolver(stmt, client, cacheContext, materializedTables);
51238
51240
  const resolvedSpec = validateGroupingPlanning(
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rex0220/kintone-sql-tools",
3
- "version": "3.82.0",
3
+ "version": "3.84.0",
4
4
  "description": "kintone SQL plugin, CLI, and MCP tools (ksql)",
5
5
  "publishConfig": {
6
6
  "access": "public"