Skip to content

Conversation

manticore-projects
Copy link
Contributor

Fixes #1551
Supports PostgreSQL INSERT ... ON CONFLICT ... DO ... according to https://www.postgresql.org/docs/current/sql-insert.html
Allow keyword KEEP, which enables another Special Oracle Test (191 are passing now)

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10
Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10
Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10
Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10
Fixes JSQLParser#1551
Refactor UpdateSet.toString(), which is used by Insert and Update
Enables special Oracle Test keywordasidentifier04.sql, now 191 tests succeed
@manticore-projects
Copy link
Contributor Author

manticore-projects commented Jun 3, 2022

I have no idea, why the Maven Build fails when the Gradle Build compiles and tests fine.
The generated sources have differences (maven on left and gradle on the right):
image

After a bit of trial and error, I think MAVEN needs to set the following JavaCC options:
arguments = [grammar_encoding: 'UTF-8', static: 'false', java_template_type: 'modern']

(Without those, the Gradle Build also fails.)

@manticore-projects
Copy link
Contributor Author

Very strange. The following Production would compile with the Gradle Plugin, but not with Maven:

Test myTest(): 
{
   Test result;
}
{
    (
      result=TestProduction1() { return result; }
    )
    |
    (
      result=TestProduction2() 
    ) { return result; }
}

Rewriting it solves the problem:

Test myTest(): 
{
   Test result;
}
{
    (
        (
          result=TestProduction1() { return result; }
        )
        |
        (
          result=TestProduction2() 
        )
    ) { return result; }
}

@wumpz wumpz merged commit 5ae09ad into JSQLParser:master Jul 19, 2022
@manticore-projects manticore-projects deleted the InsertOnConflict branch July 19, 2022 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postgres sql parsing "conflict " error
2 participants