com.github.codemonstur:jooq-preprocessor

A preprocessor for SQL files to allow for parsing with JOOQ parser

License

License

Categories

Categories

jOOQ Data Databases
GroupId

GroupId

com.github.codemonstur
ArtifactId

ArtifactId

jooq-preprocessor
Last Version

Last Version

1.8.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

com.github.codemonstur:jooq-preprocessor
A preprocessor for SQL files to allow for parsing with JOOQ parser
Project URL

Project URL

https://github.com/codemonstur/jooqpreprocessor
Source Code Management

Source Code Management

https://github.com/codemonstur/jooqpreprocessor

Download jooq-preprocessor

How to add to project

<plugin>
    <groupId>com.github.codemonstur</groupId>
    <artifactId>jooq-preprocessor</artifactId>
    <version>1.8.0</version>
</plugin>

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0
org.apache.maven : maven-project jar 2.2.1

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5

test (3)

Group / Artifact Type Version
org.jooq : jooq-codegen jar 3.12.1
org.jooq : jooq-meta-extensions jar 3.12.1
io.github.java-diff-utils : java-diff-utils jar 4.0

Project Modules

There are no modules declared in this project.

Build Status GitHub Release Maven Central MIT Licence

JOOQ preprocessor

Almost functional.

The jOOQ code generator is missing various features that prevents its use in a fully automated way. The standard workaround is to maintain two lists of SQL scripts; one for the DB to do the migration and one for the code generator to work on.

Alternatively you can try rewriting your migration scripts to be parsable by both. However there are some features that are really hard to get around because of limitations in the parser.

This preprocessor seeks to make development easier by taking the migration scripts and converting them to what the parser can handle. The parser can then operate on the reduced set of instructions.

Its been a bit of journey to find all the quirks. And the code has rough edges and is lacking tests. But it is getting very close to doing its job.

Versions

Version
1.8.0
1.7.0
1.6.0
1.5.0
1.4.1
1.4.0
1.3.1
1.3.0
1.2.0
1.1.0
1.0.0