@abaplint/cli 2.119.42 → 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.
Files changed (2) hide show
  1. package/build/cli.js +17 -12
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -29142,7 +29142,8 @@ class FieldChain {
29142
29142
  if (allowGenericDeference === false
29143
29143
  && (context === null || context === void 0 ? void 0 : context.isGeneric()) === true
29144
29144
  && input.scope.getVersion() < version_1.Version.v756
29145
- && input.scope.getVersion() !== version_1.Version.Cloud) {
29145
+ && input.scope.getVersion() !== version_1.Version.Cloud
29146
+ && input.scope.getVersion() !== version_1.Version.OpenABAP) {
29146
29147
  throw new Error("A generic reference cannot be dereferenced");
29147
29148
  }
29148
29149
  }
@@ -32154,9 +32155,23 @@ class Select {
32154
32155
  }
32155
32156
  }
32156
32157
  }
32158
+ static countResultType(scope) {
32159
+ if (scope.getVersion() >= version_1.Version.v750
32160
+ || scope.getVersion() === version_1.Version.OpenABAP
32161
+ || scope.getVersion() === version_1.Version.Cloud) {
32162
+ return new basic_1.Integer8Type();
32163
+ }
32164
+ else {
32165
+ return basic_1.IntegerType.get();
32166
+ }
32167
+ }
32157
32168
  static buildStructureType(fields, dbSources, scope) {
32158
32169
  var _a, _b, _c, _d, _e, _f;
32159
32170
  if (fields.length === 1 && dbSources.length === 1) {
32171
+ // COUNT( * ) yields an integer regardless of the (possibly dynamic) table
32172
+ if (/^count\(\s*\*\s*\)$/i.test(fields[0].code)) {
32173
+ return this.countResultType(scope);
32174
+ }
32160
32175
  const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
32161
32176
  if (dbType === undefined) {
32162
32177
  const name = ((_b = dbSources[0]) === null || _b === void 0 ? void 0 : _b.getName()) || "buildStructureTypeError";
@@ -32176,16 +32191,6 @@ class Select {
32176
32191
  if (field) {
32177
32192
  return field;
32178
32193
  }
32179
- else if (fields[0].code === "COUNT(*)") {
32180
- if (scope.getVersion() >= version_1.Version.v750
32181
- || scope.getVersion() === version_1.Version.OpenABAP
32182
- || scope.getVersion() === version_1.Version.Cloud) {
32183
- return new basic_1.Integer8Type();
32184
- }
32185
- else {
32186
- return basic_1.IntegerType.get();
32187
- }
32188
- }
32189
32194
  else {
32190
32195
  // todo: aggregated/calculated values
32191
32196
  return basic_1.VoidType.get("SELECT_todo11");
@@ -66582,7 +66587,7 @@ class Registry {
66582
66587
  }
66583
66588
  static abaplintVersion() {
66584
66589
  // magic, see build script "version.js"
66585
- return "2.119.42";
66590
+ return "2.119.43";
66586
66591
  }
66587
66592
  getDDICReferences() {
66588
66593
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.42",
3
+ "version": "2.119.43",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.119.42",
42
+ "@abaplint/core": "^2.119.43",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",