We're updating the issue view to help you get more done. 

Ability to filter objects from Database for schema tooling

Description

Schema tooling (export, update, etc) all start with a Database object and iterate over its catalog/schema combos and then over tables and sequences within each catalog/schema. In pseudo-code:

1 2 3 4 5 for ( Schema schema : database.getSchemas() ) { for ( Table table : schema.getTables() ) { ... do stuff } }

Would be great to be able to apply filtering over this process, e.g.:

1 2 3 4 5 6 7 8 9 10 11 12 for ( Schema schema : database.getSchemas() ) { if ( !filter.include( schema ) ) { continue; } for ( Table table : schema.getTables() ) { if ( !filter.include( table ) ) { continue; } ... do stuff } }

or:

1 2 3 4 5 for ( Schema schema : filter.matches( database.getSchemas() ) ) { for ( Table table : filter.matches( schema.getTables() ) ) { ... do stuff } }

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Marcus Klimstra

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

5.0.0.CR1

Priority

Major