Skip to content

basalt / prisma/src / countTenantTables

Function: countTenantTables() ​

> countTenantTables(client, schema): Promise<number>

Defined in: prisma/src/schema.ts:131

Counts the tenant's own tables, ignoring Prisma's bookkeeping table.

information_schema is queried from whatever connection the caller already has: schemas live inside one database, so an admin client on the base URL can see every tenant without connecting per schema.

Parameters ​

client ​

SchemaInspector

schema ​

string

Returns ​

Promise<number>

Released under the MIT License.