[FEATURE] How can i replace a Expression #1761
-
ProblemI want to use JSqlParse to parse some SQL for get formula result; When I implements ExpressionVisitor and override the function visit(CaseExpression caseExpression) ,after I calculated the second CASE WHEN get result is 1 , how can i replace the Expression ' (CASE WHEN 'abcdef' like '%b%e%' THEN 1 ELSE 2 END) ' to new Expression 1。-> SELECT CASE WHEN 1>1 THEN 3 ELSE 4 END; Some Code
Additional contextThe used JSQLParser Version: 4.3 Be very grateful |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Greetings. Your You can simply replace that second |
Beta Was this translation helpful? Give feedback.
Both is possible via the Java API:
Parenthesis
orParenthesis.setExpression(..)