Skip to content
Functionplugin-kysely-postgresv0.6.0Decorator

RegisterKyselyService

Registers a Kysely Postgres service with the specified key and options.

Associates a service class with a key for dependency injection. The service becomes available via core.db.services[key].

See also:KyselyService

RegisterKyselyService<TKey, TTable>(
    key: TKey,
    options?: KyselyServiceRegistrationOptions<TTable>
): <Ctor extends Constructor<KyselyServices[TKey] & { table: TTable }>>(
    ctor: Ctor
) => void

TKey

TKey

TTable

The table the service reads, defaulting to the key

TTable

The table the service reads, defaulting to the key

key

key: TKey

Service key for registration and type-safe access