JSqlParser
JSqlParser copied to clipboard
JSQLParser 4.2 up to 4.4 hava a problem
hi~
JSQLParser 4.2 up to 4.4 vesion, I have a problem,net.sf.jsqlparser.expression.Function toString method
When the database dialect is MySQL,when i want to assemble SQL totalcount , there are some differences, as shown in the picture
How can I solve this problem give me some advice
@afuchrisma
In my case I've changed the code snipped
Function countExpression = new Function();
countExpression.setName("count");
countExpression.setAllColumns(true);
To this one:
Function countExpression = new Function();
countExpression.setName("count");
countExpression.setParameters(new ExpressionList(new AllColumns()));
Hope it will help
Greetings,
we have changed * from a Function property into an Expression AllColumns, which also supports Table References, e.g. f( a.* ).
Just access the Function's parameters and set or get the Expression of each parameter and test for AllColumns Expression.
Closed, since no further questions asked.