Skip to content

examples/jdbc.roundtrip: a CWM model in code into PostgreSQL and DuckDB, and back - #93

Merged
stbischof merged 1 commit into
eclipse-daanse:mainfrom
stbischof:feature/examples-jdbc-roundtrip
Nov 14, 2026
Merged

stbischof merged 1 commit into
eclipse-daanse:mainfrom
stbischof:feature/examples-jdbc-roundtrip

Conversation

@stbischof

Copy link
Copy Markdown
Contributor

This PR follows #92 with an example that runs the relational tooling from start to end.

  • examples: a new aggregator for plain Java programs that show the CWM tooling, registered in the root pom.
  • examples/jdbc.roundtrip:
    • It builds a shop model in Java: two schemas, keys, an index, views, a function, a trigger, roles, a user and grants.
    • It writes the whole model into PostgreSQL and a part chosen by selection rules into DuckDB, once with the rules in Java and once as text.
    • It reads both back with CwmJdbcImport and compares them with what was written using CatalogDiffer and Tolerance.roundTrip.
    • The function, which DuckDB cannot write, is left out; the log names it and the comparison shows it.
    • The README shows the selection rules, the report of what a selection leaves out, the tolerances per database, and how to start the program from the IDE against a PostgreSQL container and a DuckDB file.
  • maven/README.md now points to the example as the relational goals done from start to end.

…DB, and back

A new aggregator holds plain Java programs that show the CWM tooling end
to end. jdbc.roundtrip builds a shop model in Java with two schemas,
keys, an index, views, a function, a trigger, roles, a user and grants,
writes it into PostgreSQL and a part chosen by rules, in Java and as
text, into DuckDB, reads it back and compares. What DuckDB cannot write,
the function, is left out, the log names it and the comparison shows it.

The examples are registered in the root pom, and maven/README.md points
to the round trip as the relational goals done from start to end.

Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
@stbischof
stbischof merged commit a7525c2 into eclipse-daanse:main Nov 14, 2026
6 of 7 checks passed
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.

1 participant