@abaplint/core 2.119.41 → 2.119.43
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.
|
@@ -132,7 +132,8 @@ class FieldChain {
|
|
|
132
132
|
if (allowGenericDeference === false
|
|
133
133
|
&& (context === null || context === void 0 ? void 0 : context.isGeneric()) === true
|
|
134
134
|
&& input.scope.getVersion() < version_1.Version.v756
|
|
135
|
-
&& input.scope.getVersion() !== version_1.Version.Cloud
|
|
135
|
+
&& input.scope.getVersion() !== version_1.Version.Cloud
|
|
136
|
+
&& input.scope.getVersion() !== version_1.Version.OpenABAP) {
|
|
136
137
|
throw new Error("A generic reference cannot be dereferenced");
|
|
137
138
|
}
|
|
138
139
|
}
|
|
@@ -277,9 +277,23 @@ class Select {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
+
static countResultType(scope) {
|
|
281
|
+
if (scope.getVersion() >= version_1.Version.v750
|
|
282
|
+
|| scope.getVersion() === version_1.Version.OpenABAP
|
|
283
|
+
|| scope.getVersion() === version_1.Version.Cloud) {
|
|
284
|
+
return new basic_1.Integer8Type();
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
return basic_1.IntegerType.get();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
280
290
|
static buildStructureType(fields, dbSources, scope) {
|
|
281
291
|
var _a, _b, _c, _d, _e, _f;
|
|
282
292
|
if (fields.length === 1 && dbSources.length === 1) {
|
|
293
|
+
// COUNT( * ) yields an integer regardless of the (possibly dynamic) table
|
|
294
|
+
if (/^count\(\s*\*\s*\)$/i.test(fields[0].code)) {
|
|
295
|
+
return this.countResultType(scope);
|
|
296
|
+
}
|
|
283
297
|
const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
|
|
284
298
|
if (dbType === undefined) {
|
|
285
299
|
const name = ((_b = dbSources[0]) === null || _b === void 0 ? void 0 : _b.getName()) || "buildStructureTypeError";
|
|
@@ -299,16 +313,6 @@ class Select {
|
|
|
299
313
|
if (field) {
|
|
300
314
|
return field;
|
|
301
315
|
}
|
|
302
|
-
else if (fields[0].code === "COUNT(*)") {
|
|
303
|
-
if (scope.getVersion() >= version_1.Version.v750
|
|
304
|
-
|| scope.getVersion() === version_1.Version.OpenABAP
|
|
305
|
-
|| scope.getVersion() === version_1.Version.Cloud) {
|
|
306
|
-
return new basic_1.Integer8Type();
|
|
307
|
-
}
|
|
308
|
-
else {
|
|
309
|
-
return basic_1.IntegerType.get();
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
316
|
else {
|
|
313
317
|
// todo: aggregated/calculated values
|
|
314
318
|
return basic_1.VoidType.get("SELECT_todo11");
|
package/build/src/registry.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.43",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
10
10
|
"lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" --fix",
|
|
11
|
-
"
|
|
11
|
+
"clean": "rm -rf build",
|
|
12
|
+
"compile": "npm run clean && tsc && node scripts/version.js",
|
|
12
13
|
"watch": "tsc --watch",
|
|
13
14
|
"test": "npm run compile && mocha --timeout 1000 && npm run lint && npm run schema && api-extractor run",
|
|
14
15
|
"test:only": "npm run compile && mocha --timeout 1000000",
|
|
@@ -19,8 +20,8 @@
|
|
|
19
20
|
"syntax_performance": "tsc && curl -o lexer_performance.abap https://raw.githubusercontent.com/abapGit/build/main/zabapgit_standalone.prog.abap && node build/adhoc/syntax_performance.js",
|
|
20
21
|
"typed_array": "tsc && node build/adhoc/typed_array.js",
|
|
21
22
|
"schema": "node scripts/schema.js > scripts/schema.ts && ts-json-schema-generator --tsconfig tsconfig_schema.json --jsDoc extended --path scripts/schema.ts > scripts/schema.json && node scripts/schema_post.js",
|
|
22
|
-
"publish:minor": "npm --no-git-tag-version version minor &&
|
|
23
|
-
"publish:patch": "npm --no-git-tag-version version patch &&
|
|
23
|
+
"publish:minor": "npm --no-git-tag-version version minor && npm install && npm run test && npm publish --access public",
|
|
24
|
+
"publish:patch": "npm --no-git-tag-version version patch && npm install && npm run test && npm publish --access public"
|
|
24
25
|
},
|
|
25
26
|
"mocha": {
|
|
26
27
|
"recursive": true,
|