Skip to content

Function: getDrizzleOptionsToken() ​

ts
function getDrizzleOptionsToken(token): string;

Defined in: packages/drizzle/src/drizzle.constants.ts:36

Internal

Builds the per-instance options token for a given drizzle instance token.

Each DrizzleModule registration provides (and injects) its options under this unique token — keyed by the instance token (default DRIZZLE_INSTANCE or a custom tag). Keeping the token unique prevents a second registration from overwriting the first registration's options when core merges the deduped DrizzleModule scope, which previously caused every drizzle instance to collapse onto the last-registered db.

Parameters ​

ParameterTypeDescription
tokenstring | symbolThe drizzle instance token (default or a custom tag).

Returns ​

string

A stable string token unique to this instance.

Released under the MIT License.