FirebirdSQL / jaybird

JDBC driver for Firebird
https://firebirdsql.org/en/jdbc-driver/
GNU Lesser General Public License v2.1
94 stars 23 forks source link

Replace statement parser for generated keys to remove dependency on ANTLR #680

Closed mrotteveel closed 3 years ago

mrotteveel commented 3 years ago

Currently, we use ANTLR to be able to parse statements for detection of statement type, finding the target table name (for column names to add in the RETURNING clause), and detection of a RETURNING clause (to not add another one) for the generated keys facility. When the antlr4-runtime library is not on the classpath, generated keys support is not available.

Replacing the parser has the benefit of removing a dependency (on antlr4-runtime), and always availability of generated keys support. Potentially, the parser can also be reused in the future for parsing JDBC escapes.