JSqlParser icon indicating copy to clipboard operation
JSqlParser copied to clipboard

begin end

Open DexterPoker opened this issue 3 years ago • 2 comments

https://github.com/JSQLParser/JSqlParser/blob/6cff161dacc1e6feeccce709ca08220e576836be/src/main/java/net/sf/jsqlparser/statement/Block.java#L31

in oracle 19c ‘begin end;‘ its needs the semicolon otherwise oracle showed the error code “pls-00103”. Is there an option to provide.

DexterPoker avatar May 23 '22 07:05 DexterPoker

Greetings!

Thanks for the information, I would implement this accordingly.

manticore-projects avatar May 23 '22 07:05 manticore-projects

Hi.

  1. an optional ending ; is parsed after the END keyword.
  2. although the toString() and the Deparser will never end a block or statement with a ; -- not for any statements

So it is safe to say, that the parser strips the ending ; and you would need to add it (by yourself) to the result of the toString() or Deparser.

In my opinion, there is also a good reason for this behavior: Oracle JDBC 11 (or less) wont accept Statements with an ending ; and it always needs to be stripped first (which is quite annoying).

So, it's a WON'T FIX.

manticore-projects avatar May 23 '22 13:05 manticore-projects

Closed, since no further question has been asked.

manticore-projects avatar Nov 12 '22 06:11 manticore-projects