You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
daa
changed the title
Support including or excluding list of schema, not just single schema
Support including or excluding list of schemas, not just single schema
Jul 23, 2021
Recently I thought that we have a third alternative: make database inspector and consequently get_inspector() accept argument with predicate function to match schema and then apply this function to filter affected schemas. We may reuse schema argument or add a new argument, for example accept_schema in addition to schema and exclude_schema and may be gradually deprecate the latter because proposed approach covers all their possible usage variants. I'd like to hear your opinion on this.
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:
get_inspector()
andschemainspect.pg.obj.PostgreSQL.filter_schema()
to accept list of strings inschema
andexclude_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 compatibilityschema
andinclude_schema
parameters as regular expression patterns thus keeping function signature but slighly changing old behaviour: passing plain string would mean matching schema by given prefixWhat 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.
The text was updated successfully, but these errors were encountered: