JSqlParser icon indicating copy to clipboard operation
JSqlParser copied to clipboard

Update JSqlParserCC.jjt

Open xiaoyunwu opened this issue 3 years ago • 3 comments

support json operator in postgres

xiaoyunwu avatar Sep 16 '21 19:09 xiaoyunwu

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);
  }
}

manticore-projects avatar Sep 17 '21 00:09 manticore-projects

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.

manticore-projects avatar Sep 17 '21 01:09 manticore-projects

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.

manticore-projects avatar Sep 11 '22 06:09 manticore-projects

Any feedback please? I would like top close this otherwise.

manticore-projects avatar Jul 18 '23 03:07 manticore-projects

This thing is dead. Please resubmit properly when there is any serious interest.

manticore-projects avatar Sep 12 '23 09:09 manticore-projects