class SchemaPerTenant

Isolates tenants by assigning each a separate database schema.

The default schema prefix is 'tenant_', configurable at construction.

Implements the 'schema' arm of ITenantIsolationStrategy.

Constructors

SchemaPerTenant(prefix?: string)

Properties

readonly
kind: "schema"

Methods

resolveSchema(tenantId: string): string

Derive the schema name for a tenant id.

Usage

import { SchemaPerTenant } from "multi-tenancy-plugin/src/index.ts";