@abaplint/transpiler 2.3.67 → 2.3.69

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.
@@ -53,6 +53,10 @@ class SQLiteDatabaseSchema {
53
53
  }
54
54
  const fields = [];
55
55
  for (const field of type.getComponents()) {
56
+ if (field.type instanceof abaplint.BasicTypes.StructureType) {
57
+ // is a GROUP NAME
58
+ continue;
59
+ }
56
60
  fields.push("'" + field.name.toLowerCase() + "' " + this.toType(field.type, field.name, tabl.getName()));
57
61
  }
58
62
  // assumption: all transparent tables have primary keys
@@ -61,6 +61,11 @@ class SQLCondTranspiler {
61
61
  const fieldName = c.findDirectExpression(abaplint.Expressions.SQLFieldName);
62
62
  const operator = c.findDirectExpression(abaplint.Expressions.SQLCompareOperator);
63
63
  const source = c.findDirectExpression(abaplint.Expressions.SQLSource);
64
+ if (fieldName && source && operator === undefined && c.findDirectTokenByText("LIKE")) {
65
+ ret += fieldName.concatTokens() + " LIKE ";
66
+ ret += this.sqlSource(source, traversal);
67
+ return ret;
68
+ }
64
69
  if (fieldName === undefined || operator === undefined || source === undefined) {
65
70
  throw new Error("SQL Condition, transpiler todo2, " + c.concatTokens());
66
71
  }
@@ -45,7 +45,13 @@ class ReadTableTranspiler {
45
45
  const left = compare.getChildren()[i * 3];
46
46
  const source = compare.getChildren()[(i * 3) + 2];
47
47
  const s = traversal.traverse(source).getCode();
48
- let field = left.concatTokens().toLowerCase().replace("->", ".get().").replace("-", ".get().");
48
+ let field = left.concatTokens().toLowerCase();
49
+ while (field.includes("->")) {
50
+ field = field.replace("->", ".get().");
51
+ }
52
+ while (field.includes("-")) {
53
+ field = field.replace("-", ".get().");
54
+ }
49
55
  if (left.get() instanceof abaplint.Expressions.Dynamic
50
56
  && left instanceof abaplint.Nodes.ExpressionNode) {
51
57
  const concat = left.concatTokens().toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.3.67",
3
+ "version": "2.3.69",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",