@abaplint/core 2.98.0 → 2.98.2

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.
@@ -15,7 +15,7 @@ class Select extends combi_1.Expression {
15
15
  const where = (0, combi_1.seq)("WHERE", _1.SQLCond);
16
16
  const offset = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)("OFFSET", _1.SQLSource));
17
17
  const bypass = (0, combi_1.str)("BYPASSING BUFFER");
18
- const fields = (0, combi_1.seq)("FIELDS", _1.SQLFieldList);
18
+ const fields = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("FIELDS", _1.SQLFieldList));
19
19
  const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection);
20
20
  const permSingle = (0, combi_1.per)(_1.SQLFrom, sql_into_structure_1.SQLIntoStructure, where, _1.SQLClient, bypass, fields, _1.DatabaseConnection);
21
21
  const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), sql_field_name_1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.98.0";
66
+ return "2.98.2";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -47,7 +47,7 @@ DATA lt_bar TYPE STANDARD TABLE OF ty.`,
47
47
  const message = "Specify table type";
48
48
  issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
49
49
  }
50
- else if (concat.includes(" WITH ") === false) {
50
+ else if (concat.includes(" WITH ") === false && concat.includes(" RANGE OF ") === false) {
51
51
  const message = "Specify table key";
52
52
  issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
53
53
  }
@@ -62,9 +62,21 @@ class SelectSingleFullKey {
62
62
  continue;
63
63
  }
64
64
  const tabl = this.findReference(databaseTable.getFirstToken().getStart(), syntax.spaghetti, file);
65
- const keys = this.reg.getObject("TABL", tabl).listKeys(this.reg);
65
+ const table = this.reg.getObject("TABL", tabl);
66
+ if (table === undefined) {
67
+ continue;
68
+ }
69
+ const keys = table.listKeys(this.reg);
70
+ // const type = table.parseType(this.reg);
66
71
  const cond = s.findFirstExpression(__1.Expressions.SQLCond);
67
- const set = new Set(keys);
72
+ const set = new Set();
73
+ for (const key of keys) {
74
+ if (key === "MANDT") {
75
+ // todo, it should check for the correct type instead
76
+ continue;
77
+ }
78
+ set.add(key);
79
+ }
68
80
  for (const compare of (cond === null || cond === void 0 ? void 0 : cond.findAllExpressionsRecursive(__1.Expressions.SQLCompare)) || []) {
69
81
  if (compare.getChildren().length === 3) {
70
82
  const fname = (_a = compare.findDirectExpression(__1.Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.98.0",
3
+ "version": "2.98.2",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",