|
Make the Database and Schema classes extendable by extracting interfaces. This allows for the creation of wrapper classes for example.
In my case I need to be able to filter the tables that are used for schema operations: I only want to run create and drop operations for tables that start with a specific prefix. I implemented this by creating a FilteredMetadata, FilteredDatabase and FilteredSchema that delegate all calls to the regular implementation, except that Schema.getTables() only returns the tables that satisfy the filter.
|