@abaplint/core 2.105.10 → 2.105.12

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.
@@ -16,13 +16,14 @@ class Select extends combi_1.Expression {
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
18
  const fields = (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields);
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
- const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, fields, _1.DatabaseConnection);
19
+ // todo, HINTS cannot be anywhere, need an expression dedicated for strict sql
20
+ 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, _1.SQLHints);
21
+ const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, fields, _1.DatabaseConnection, _1.SQLHints);
21
22
  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));
22
23
  const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));
23
24
  const single = (0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, permSingle);
24
25
  const other = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, perm);
25
- const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other), (0, combi_1.optPrio)(_1.SQLHints));
26
+ const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other));
26
27
  return ret;
27
28
  }
28
29
  }
@@ -170,6 +170,9 @@ class Source {
170
170
  while (children.length >= 0) {
171
171
  if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.MethodCallChain) {
172
172
  context = new method_call_chain_1.MethodCallChain().runSyntax(first, scope, filename, targetType);
173
+ if (context === undefined) {
174
+ throw new Error("Method has no RETURNING value");
175
+ }
173
176
  }
174
177
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.FieldChain) {
175
178
  context = new field_chain_1.FieldChain().runSyntax(first, scope, filename, type);
@@ -23,6 +23,19 @@ class SQLCompare {
23
23
  }
24
24
  sourceType = new sql_source_1.SQLSource().runSyntax(s, scope, filename);
25
25
  }
26
+ const sqlin = node.findDirectExpression(Expressions.SQLIn);
27
+ if (sqlin && sqlin.getChildren().length === 2) {
28
+ const insource = node.findFirstExpression(Expressions.SQLSource);
29
+ if (insource) {
30
+ const intype = new sql_source_1.SQLSource().runSyntax(insource, scope, filename);
31
+ if (intype &&
32
+ !(intype instanceof basic_1.VoidType) &&
33
+ !(intype instanceof basic_1.UnknownType) &&
34
+ !(intype instanceof basic_1.TableType)) {
35
+ throw new Error("IN, not a table");
36
+ }
37
+ }
38
+ }
26
39
  const fieldName = (_a = node.findDirectExpression(Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens();
27
40
  if (fieldName && sourceType && token) {
28
41
  // check compatibility for rule sql_value_conversion
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.105.10";
68
+ return "2.105.12";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.105.10",
3
+ "version": "2.105.12",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,11 +53,11 @@
53
53
  "@microsoft/api-extractor": "^7.39.1",
54
54
  "@types/chai": "^4.3.11",
55
55
  "@types/mocha": "^10.0.6",
56
- "@types/node": "^20.10.8",
57
- "chai": "^4.4.0",
56
+ "@types/node": "^20.11.5",
57
+ "chai": "^4.4.1",
58
58
  "eslint": "^8.56.0",
59
59
  "mocha": "^10.2.0",
60
- "c8": "^9.0.0",
60
+ "c8": "^9.1.0",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^1.5.0",
63
63
  "typescript": "^5.3.3"