JSqlParser
JSqlParser copied to clipboard
Update JSqlParserCC.jjt
support json operator in postgres
Greetings!
Thank you very much for the contribution, much appreciated.
Please would you also like to add a simple Unit Test Case testing this operator. It should prove that your SQL Statements are parsed and deparsed correctly. (I am especially worried about deparsing as you did not touch the Java Object Code yet.)
You can use the following template:
package net.sf.jsqlparser.expression;
import net.sf.jsqlparser.JSQLParserException;
import net.sf.jsqlparser.test.TestUtils;
import org.junit.Test;
/**
*
* @author <a href="mailto:[email protected]">Andreas Reichel</a>
*/
public class CastExpressionTest {
@Test
public void testCastToRowConstructorIssue1267() throws JSQLParserException {
TestUtils.assertExpressionCanBeParsedAndDeparsed("CAST(ROW(dataid, value, calcMark) AS ROW(datapointid CHAR, value CHAR, calcMark CHAR))", true);
TestUtils.assertExpressionCanBeParsedAndDeparsed("CAST(ROW(dataid, value, calcMark) AS testcol)", true);
}
}
You can also add fixes #1337
to the description of the PR (not the caption though) in order to link between issue and PR and auto-close when accepted.
Greetings.
If this PR is still of interest, then please follow the recommendations here: https://manticore-projects.com/JSQLParser/contribution.html#amend-the-code
Otherwise I would like to suggest to close it as a stale PR.
Any feedback please? I would like top close this otherwise.
This thing is dead. Please resubmit properly when there is any serious interest.