exasol/test-db-builder-java

Fix the `DatabaseObjectWriter` hierarchy

Closed this issue · 1 comments

At the moment, we have some members of the DatabaseObjectWriter hierarchy that restrict the features of the super classes, as in
https://github.com/exasol/test-db-builder-java/blob/main/src/main/java/com/exasol/dbbuilder/dialects/postgres/PostgreSqlImmediateDatabaseObjectWriter.java#L33

A class should extend another one if:

  • the subclass is a superclass
  • the subclass can do everything the superclass can

Extending a class restricting the super class is usually not a good idea, as it breaks the Liskov substitution principle and will eventually lead to a hierarchy hard to maintain, extend and change.

We should fix this.

Shelved.