Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
optimize splitExpr query as suggested by @Vadimtro in #109
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippSalvisberg committed Jun 9, 2021
1 parent 4747a61 commit 0832a79
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions settings/sql_developer/trivadis_custom_format.arbori
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,6 @@ splittableArgList:
| splittableArgList2
;


allExprList:
[parent) "(x,y,z)"
;

splittableExprList1:
[parent) "(x,y,z)"
& [arg1) "expr_list"
Expand Down Expand Up @@ -360,12 +355,13 @@ splitExpr:
& [node) expr
& ![node^) assoc_arg
& ![node^) compound_expression
& allExprList.parent < node
& allExprListParent < node
& [allExprListParent) "(x,y,z)"
& splittableExprList.parent < node
-> {
// filter via JavaScript
var all = tuple.get("allExprList.parent");
var splittable = tuple.get("splittableExprList.parent");
var all = tuple.get("allExprListParent");
var splittable = tuple.get("parent");
logger.fine(struct.getClass(), "splitExpr (found): " + tuple.get('node'));
if (all == splittable) {
logger.fine(struct.getClass(), "splitExpr (splitted): " + tuple.get('node'));
Expand Down

0 comments on commit 0832a79

Please sign in to comment.