@rex0220/kintone-sql-tools 3.47.0 → 3.49.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/dist-cli/ksql.js +26 -4
- package/dist-engine/index.cjs +10 -9
- package/dist-engine/index.mjs +10 -9
- package/dist-engine/ksql-engine.umd.js +10 -9
- package/dist-engine/meta/bundle-baseline.json +7 -7
- package/dist-engine/meta/cjs.json +7 -7
- package/dist-engine/meta/esm.json +7 -7
- package/dist-engine/meta/umd.json +7 -7
- package/dist-engine/publicTypes.d.ts +8 -0
- package/dist-mcp/ksql-mcp.js +65 -42
- package/dist-mcpb/ksql-mcp.mcpb +0 -0
- package/package.json +1 -1
package/dist-cli/ksql.js
CHANGED
|
@@ -1053,6 +1053,12 @@ var ParseError = class extends Error {
|
|
|
1053
1053
|
this.name = "ParseError";
|
|
1054
1054
|
}
|
|
1055
1055
|
};
|
|
1056
|
+
var WINDOW_RESULT_IN_EXPRESSION_MESSAGE = [
|
|
1057
|
+
"\u30A6\u30A3\u30F3\u30C9\u30A6\u95A2\u6570\u306E\u7D50\u679C\u306F\u540C\u3058 SELECT \u306E\u5F0F\u3067\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002",
|
|
1058
|
+
" \xD7 SELECT ROUND(SUM(x) OVER (), 1) AS a FROM t",
|
|
1059
|
+
" \u25CB WITH w AS (SELECT SUM(x) OVER () AS \u7DCF\u8A08 FROM t) SELECT ROUND(\u7DCF\u8A08, 1) AS a FROM w",
|
|
1060
|
+
"\u30A6\u30A3\u30F3\u30C9\u30A6\u7D50\u679C\u3092\u5217\u3068\u3057\u3066\u51FA\u3057\u3001\u305D\u308C\u3092\u4F7F\u3046\u5F0F\u306F\u6B21\u306E\u6BB5\uFF08CTE \u307E\u305F\u306F\u4E00\u6642\u30C6\u30FC\u30D6\u30EB\uFF09\u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044"
|
|
1061
|
+
].join("\n");
|
|
1056
1062
|
var Parser = class {
|
|
1057
1063
|
constructor(tokens, capabilities = {}) {
|
|
1058
1064
|
this.tokens = tokens;
|
|
@@ -1972,7 +1978,7 @@ var Parser = class {
|
|
|
1972
1978
|
}
|
|
1973
1979
|
if (this.tryAggregateFunc() === null && this.hasNestedAggregateWindowInSelectColumn()) {
|
|
1974
1980
|
throw new ParseError(
|
|
1975
|
-
|
|
1981
|
+
WINDOW_RESULT_IN_EXPRESSION_MESSAGE,
|
|
1976
1982
|
this.peek()
|
|
1977
1983
|
);
|
|
1978
1984
|
}
|
|
@@ -2169,7 +2175,7 @@ var Parser = class {
|
|
|
2169
2175
|
this.expect(")" /* RPAREN */);
|
|
2170
2176
|
if (this.isArithOp(this.peek().kind)) {
|
|
2171
2177
|
throw new ParseError(
|
|
2172
|
-
|
|
2178
|
+
WINDOW_RESULT_IN_EXPRESSION_MESSAGE,
|
|
2173
2179
|
this.peek()
|
|
2174
2180
|
);
|
|
2175
2181
|
}
|
|
@@ -22996,11 +23002,23 @@ async function executeShowApps(client) {
|
|
|
22996
23002
|
}
|
|
22997
23003
|
async function executeDescribe(stmt, client, cacheContext) {
|
|
22998
23004
|
const fields = await getFieldsCached(stmt.appId, client, cacheContext);
|
|
22999
|
-
const columns = [
|
|
23005
|
+
const columns = [
|
|
23006
|
+
"\u30D5\u30A3\u30FC\u30EB\u30C9\u30B3\u30FC\u30C9",
|
|
23007
|
+
"\u30E9\u30D9\u30EB",
|
|
23008
|
+
"\u30BF\u30A4\u30D7",
|
|
23009
|
+
"\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7",
|
|
23010
|
+
"\u30B3\u30D4\u30FC\u5143",
|
|
23011
|
+
"\u91CD\u8907\u7981\u6B62",
|
|
23012
|
+
"\u8A08\u7B97\u5F0F"
|
|
23013
|
+
];
|
|
23000
23014
|
const rows = fields.map((f) => ({
|
|
23001
23015
|
"\u30D5\u30A3\u30FC\u30EB\u30C9\u30B3\u30FC\u30C9": f.code,
|
|
23002
23016
|
"\u30E9\u30D9\u30EB": f.label,
|
|
23003
|
-
"\u30BF\u30A4\u30D7": f.fieldType
|
|
23017
|
+
"\u30BF\u30A4\u30D7": f.fieldType,
|
|
23018
|
+
"\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7": f.hasLookup === true ? "YES" : "",
|
|
23019
|
+
"\u30B3\u30D4\u30FC\u5143": f.isLookupCopyTarget === true ? "YES" : "",
|
|
23020
|
+
"\u91CD\u8907\u7981\u6B62": f.isUnique === true ? "YES" : "",
|
|
23021
|
+
"\u8A08\u7B97\u5F0F": f.isCalculated === true ? "YES" : ""
|
|
23004
23022
|
}));
|
|
23005
23023
|
return { type: "SELECT", rows, columns, rowCount: rows.length };
|
|
23006
23024
|
}
|
|
@@ -25634,6 +25652,10 @@ function flattenFields(properties, lookupCopyFields, inSubtable = false, subtabl
|
|
|
25634
25652
|
minLength: normalizeConstraintValue(field.minLength),
|
|
25635
25653
|
maxLength: normalizeConstraintValue(field.maxLength),
|
|
25636
25654
|
defaultValue: field.defaultValue,
|
|
25655
|
+
hasLookup: Object.prototype.hasOwnProperty.call(field, "lookup"),
|
|
25656
|
+
isLookupCopyTarget: lookupCopyFields.has(field.code),
|
|
25657
|
+
isUnique: field.unique === true,
|
|
25658
|
+
isCalculated: field.type === "CALC" || typeof field.expression === "string" && field.expression.length > 0,
|
|
25637
25659
|
inSubtable,
|
|
25638
25660
|
...subtableCode ? { subtableCode } : {},
|
|
25639
25661
|
writable: !lookupCopyFields.has(field.code) && !NON_WRITABLE_FIELD_TYPES3.has(field.type)
|