Closed FelixZY closed 1 year ago
exclude:
and include:
are shown in the following figure.
ref: https://github.com/k1LoW/tbls#filter-tables
How can I exclude all tables in the auth schema, except auth.users?
There may be no other way but to list.
How can I include all other tables when using an include section? (* does not seem to work when used alone)
tbls will target all tables even if nothing is specified. If the table you want is not output, it may not be included in the range of the DSN given to tbls.
Could you provide a schema (DDL) and DSN example ?
Hm, i guess that if it is not possible to include specific tables when using a general exclude, there is no point in doing
include:
- "*"
If i skip the include section and use specific excludes, things work as expected, so I don't think an example is necessary. However, if I were to rephrase my question into a feature request:
Right now, logic is
include
exclude
As a user, I would expect the logic to be
include
/exclude
overlapsschema.MyTable
> schema.*
or schema.MyT*
> schema.*
), include the table(s). If include is equally or less specific than exclude, exclude wins.If include is more specific than exclude (i.e. schema.MyTable > schema. or schema.MyT > schema.*), include the table(s). If include is equally or less specific than exclude, exclude wins.
This logic is not included now. But it looks good to me.
I have a database where I want to exclude all tables from the
auth
schema, exceptauth.users
. This database also has tables in other schemas that I want to be included.I tried
However, this causes all output to be excluded, producing an empty output.
auth
schema, exceptauth.users
?include
section? (*
does not seem to work when used alone)Environment
tbls 1.56.2
Debian bullseye
bash