Skip to content

Support including or excluding list of schemas, not just single schema #68

@daa

Description

@daa

Work done in #58 adds an ability to include or exclude single schema, but recently I've met the need to limit considered schemas to a list of them or symmetrically to exclude a list of schemas from consideration, hence this feature request. Also I'd like to submit a pull request with implementation.

As for implementation I see 2 possible ways:

  • make get_inspector() and schemainspect.pg.obj.PostgreSQL.filter_schema() to accept list of strings in schema and exclude_schema parameter. Here again we have 2 possibilities: accept list in addition to just string to keep old behaviour or accept only list and break compatibility
  • treat schema and include_schema parameters as regular expression patterns thus keeping function signature but slighly changing old behaviour: passing plain string would mean matching schema by given prefix

What do you think? Personally I lean towards the first alternative, i.e. accept a list of strings in addition to just string in corresponding function and method parameters.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions