DatabaseScope

Defines the scope level at which a database operates.

This enum works in conjunction with the DI scope hierarchy:

  • AppScope (singleton) - DatabaseRouter and registries live here

  • UserScope (per authenticated user) - UserContext with tenantId + principalId

  • SessionScope (per request/session)

Both TENANT and USER scoped databases are accessed via UserScope, because UserContext contains both tenant info AND principal/user info.

Entries

Link copied to clipboard

App-scoped database: shared across all tenants and users. Examples: system config, feature flags, global lookups, bootstrap registry.

Link copied to clipboard

Tenant-scoped database (default): isolated per tenant. Examples: tenant data, organization settings, party management.

Link copied to clipboard

User-scoped database: isolated per user/principal. Examples: wallet data, personal credentials, user preferences.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.