Skip to content

jdbgen 0.3.2

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Aug 01:45
· 4 commits to master since this release
1192fad

The main window is the place to set up a generation

Everything that decides what gets generated is edited in the main window now. The Templates and Options tabs of the Connection Manager are gone; templates, the output directory, the author and the custom variables sit next to the table list, and the Connection Manager keeps only the connection itself. Edits to these options and the template ticks are stored with the connection — until now they were lost on restart.

The window has grown a menu bar which takes over the dark UI switch, the language selection, the abbreviation mapper and the about box. The table list gets a name filter with a select-all popup, the template table gets add / edit / delete / preset actions and a hint while it is empty, and the three panels are separated by splitters. The size, position and divider positions of the window are remembered across starts.

Along the way: the options panel no longer shows stale values after switching connections, the custom variable delete button works, and the driver list is refreshed after the Driver Manager was used from the menu.

Every window rebuilt with MigLayout

The NetBeans form editor and its generated GroupLayout code are gone. Every window and dialog is laid out by hand-written MigLayout code — one method per panel, lambdas instead of anonymous listener classes — so the layouts can be read and changed without a form editor. The dialogs pack to the same size they did before; a few alignments and dialog sizes were fixed on the way, and the acknowledgements heading no longer depends on a Korean system font. The AbsoluteLayout dependency and the .form files are dropped.

Drivers: H2 is bundled, the rest are one click away

The H2 driver of the sample database ships with the release below drivers/ of the installation, so the Sample H2 Embedded connection works out of the box — nothing has to be downloaded before the first Generate.

The other stock drivers carry their Maven coordinates now. Download in the Driver Manager fetches the jar straight from Maven Central instead of opening a search first; the Maven Repository Explorer is still there for anything else. Drivers whose jar is missing are marked in red in the driver list, so a fresh installation shows at a glance what still needs downloading. The stock definitions were refreshed as well: the current MySQL driver class and coordinate (with useInformationSchema for table comments) and a service-name URL for Oracle.

Tested against real databases

Every main source file has javadoc, and the unit tests cover the template syntax and its error paths, DBMeta against a real H2 database, result set mapping, the validation rules and the utility classes. A new integrationTest task (not part of check) starts PostgreSQL, MySQL, MariaDB, SQL Server and Oracle in Docker with Testcontainers, seeds them and reads them back through the stock driver definitions — comments, composite key order and template rendering included.

The tests found their share of bugs, fixed here:

  • DBMeta tolerates null credentials, lists the schemas of catalog-less databases (Oracle), orders composite primary keys by KEY_SEQ and refuses metadata calls on a closed connection with a clear message instead of an obscure one.
  • The template engine parses empty literals, and for numbering skips skiplisted elements.
  • Driver validation requires tablesSql / columnsSql when they are enabled.
  • Null-safe lookups in the string, object and naming utilities; toInt truncates fractions; the version comparison treats pre-releases as older than the release.

Documentation

The screenshots are regenerated from the reworked windows by the gradlew docShots task, which starts the real application in a throwaway data directory and photographs it — see Building from Source.

Installation

Windows: run jdbgen-0.3.2.msi — nothing else is needed. Submission to the winget community repository as Xcomart.Jdbgen is underway; once accepted, winget install Xcomart.Jdbgen will be enough.

Every platform: unzip jdbgen-0.3.2.zip and run jdbgen.sh (Linux/macOS) or jdbgen.cmd (Windows). Requires a Java runtime, version 11 or above.

See Installation for details.

Full Changelog: v0.3.1...v0.3.2