PrismaService
Defined in: packages/database/src/prisma.service.ts:55
Profile-aware Prisma client.
Boot semantics:
- profile=lite: the client is built, and
$connect()is invoked on first DB op (lazy). The profile expects Postgres to be reachable at runtime, so the constructor does not throw whenDATABASE_URLis missing — it is validated lazily on first use. - profile=standard (default): eager
$connect()so misconfigured deployments fail loudly at startup.
The eager/lazy toggle is driven entirely by the DEPLOYMENT_PROFILE
env var so callers do not need to know about the toggle; the service
just does the right thing.
Extends
Section titled “Extends”PrismaClient
Implements
Section titled “Implements”OnModuleInitOnModuleDestroy
Indexable
Section titled “Indexable”[
K:symbol]:object
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PrismaService():
PrismaService
Defined in: packages/database/src/prisma.service.ts:60
Returns
Section titled “Returns”PrismaService
Overrides
Section titled “Overrides”PrismaClient.constructor
Properties
Section titled “Properties”$extends
Section titled “$extends”$extends:
ExtendsHook<"extends",TypeMapCb<PrismaClientOptions>,DefaultArgs,TypeMap<InternalArgs&DefaultArgs, { }>>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:228
Inherited from
Section titled “Inherited from”PrismaClient.$extends
Accessors
Section titled “Accessors”apiKey
Section titled “apiKey”Get Signature
Section titled “Get Signature”get apiKey():
ApiKeyDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:270
prisma.apiKey: Exposes CRUD operations for the ApiKey model.
- Example usage:
-
- // Fetch zero or more ApiKeys
- const apiKeys = await prisma.apiKey.findMany()
-
Returns
Section titled “Returns”ApiKeyDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.apiKey
authKvEntry
Section titled “authKvEntry”Get Signature
Section titled “Get Signature”get authKvEntry():
AuthKvEntryDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:330
prisma.authKvEntry: Exposes CRUD operations for the AuthKvEntry model.
- Example usage:
-
- // Fetch zero or more AuthKvEntries
- const authKvEntries = await prisma.authKvEntry.findMany()
-
Returns
Section titled “Returns”AuthKvEntryDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.authKvEntry
membership
Section titled “membership”Get Signature
Section titled “Get Signature”get membership():
MembershipDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:250
prisma.membership: Exposes CRUD operations for the Membership model.
- Example usage:
-
- // Fetch zero or more Memberships
- const memberships = await prisma.membership.findMany()
-
Returns
Section titled “Returns”MembershipDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.membership
memory
Section titled “memory”Get Signature
Section titled “Get Signature”get memory():
MemoryDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:280
prisma.memory: Exposes CRUD operations for the Memory model.
- Example usage:
-
- // Fetch zero or more Memories
- const memories = await prisma.memory.findMany()
-
Returns
Section titled “Returns”MemoryDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.memory
memoryAudit
Section titled “memoryAudit”Get Signature
Section titled “Get Signature”get memoryAudit():
MemoryAuditDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:290
prisma.memoryAudit: Exposes CRUD operations for the MemoryAudit model.
- Example usage:
-
- // Fetch zero or more MemoryAudits
- const memoryAudits = await prisma.memoryAudit.findMany()
-
Returns
Section titled “Returns”MemoryAuditDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.memoryAudit
memoryImportSource
Section titled “memoryImportSource”Get Signature
Section titled “Get Signature”get memoryImportSource():
MemoryImportSourceDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:310
prisma.memoryImportSource: Exposes CRUD operations for the MemoryImportSource model.
- Example usage:
-
- // Fetch zero or more MemoryImportSources
- const memoryImportSources = await prisma.memoryImportSource.findMany()
-
Returns
Section titled “Returns”MemoryImportSourceDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.memoryImportSource
memoryLink
Section titled “memoryLink”Get Signature
Section titled “Get Signature”get memoryLink():
MemoryLinkDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:300
prisma.memoryLink: Exposes CRUD operations for the MemoryLink model.
- Example usage:
-
- // Fetch zero or more MemoryLinks
- const memoryLinks = await prisma.memoryLink.findMany()
-
Returns
Section titled “Returns”MemoryLinkDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.memoryLink
migrationCheckpoint
Section titled “migrationCheckpoint”Get Signature
Section titled “Get Signature”get migrationCheckpoint():
MigrationCheckpointDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:320
prisma.migrationCheckpoint: Exposes CRUD operations for the MigrationCheckpoint model.
- Example usage:
-
- // Fetch zero or more MigrationCheckpoints
- const migrationCheckpoints = await prisma.migrationCheckpoint.findMany()
-
Returns
Section titled “Returns”MigrationCheckpointDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.migrationCheckpoint
organization
Section titled “organization”Get Signature
Section titled “Get Signature”get organization():
OrganizationDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:240
prisma.organization: Exposes CRUD operations for the Organization model.
- Example usage:
-
- // Fetch zero or more Organizations
- const organizations = await prisma.organization.findMany()
-
Returns
Section titled “Returns”OrganizationDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.organization
rateLimitCounter
Section titled “rateLimitCounter”Get Signature
Section titled “Get Signature”get rateLimitCounter():
RateLimitCounterDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:340
prisma.rateLimitCounter: Exposes CRUD operations for the RateLimitCounter model.
- Example usage:
-
- // Fetch zero or more RateLimitCounters
- const rateLimitCounters = await prisma.rateLimitCounter.findMany()
-
Returns
Section titled “Returns”RateLimitCounterDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.rateLimitCounter
reindexJob
Section titled “reindexJob”Get Signature
Section titled “Get Signature”get reindexJob():
ReindexJobDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:350
prisma.reindexJob: Exposes CRUD operations for the ReindexJob model.
- Example usage:
-
- // Fetch zero or more ReindexJobs
- const reindexJobs = await prisma.reindexJob.findMany()
-
Returns
Section titled “Returns”ReindexJobDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.reindexJob
Get Signature
Section titled “Get Signature”get user():
UserDelegate<ExtArgs,ClientOptions>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:260
prisma.user: Exposes CRUD operations for the User model.
- Example usage:
-
- // Fetch zero or more Users
- const users = await prisma.user.findMany()
-
Returns
Section titled “Returns”UserDelegate<ExtArgs, ClientOptions>
Inherited from
Section titled “Inherited from”PrismaClient.user
Methods
Section titled “Methods”$connect()
Section titled “$connect()”$connect():
Promise<void>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:157
Connect with the database
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”PrismaClient.$connect
$disconnect()
Section titled “$disconnect()”$disconnect():
Promise<void>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:162
Disconnect from the database
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”PrismaClient.$disconnect
$executeRaw()
Section titled “$executeRaw()”$executeRaw<
T>(query, …values):PrismaPromise<number>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:173
Executes a prepared raw query and returns the number of affected rows.
Type Parameters
Section titled “Type Parameters”T = unknown
Parameters
Section titled “Parameters”TemplateStringsArray | Sql
values
Section titled “values”…any[]
Returns
Section titled “Returns”PrismaPromise<number>
Example
Section titled “Example”const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`Read more in our docs.
Inherited from
Section titled “Inherited from”PrismaClient.$executeRaw
$executeRawUnsafe()
Section titled “$executeRawUnsafe()”$executeRawUnsafe<
T>(query, …values):PrismaPromise<number>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:185
Executes a raw query and returns the number of affected rows. Susceptible to SQL injections, see documentation.
Type Parameters
Section titled “Type Parameters”T = unknown
Parameters
Section titled “Parameters”string
values
Section titled “values”…any[]
Returns
Section titled “Returns”PrismaPromise<number>
Example
Section titled “Example”const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')Read more in our docs.
Inherited from
Section titled “Inherited from”PrismaClient.$executeRawUnsafe
$on<
V>(eventType,callback):PrismaClient
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:152
Type Parameters
Section titled “Type Parameters”V extends never
Parameters
Section titled “Parameters”eventType
Section titled “eventType”V
callback
Section titled “callback”(event) => void
Returns
Section titled “Returns”PrismaClient
Inherited from
Section titled “Inherited from”PrismaClient.$on
$queryRaw()
Section titled “$queryRaw()”$queryRaw<
T>(query, …values):PrismaPromise<T>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:196
Performs a prepared raw query and returns the SELECT data.
Type Parameters
Section titled “Type Parameters”T = unknown
Parameters
Section titled “Parameters”TemplateStringsArray | Sql
values
Section titled “values”…any[]
Returns
Section titled “Returns”PrismaPromise<T>
Example
Section titled “Example”const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`Read more in our docs.
Inherited from
Section titled “Inherited from”PrismaClient.$queryRaw
$queryRawUnsafe()
Section titled “$queryRawUnsafe()”$queryRawUnsafe<
T>(query, …values):PrismaPromise<T>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:208
Performs a raw query and returns the SELECT data.
Susceptible to SQL injections, see documentation.
Type Parameters
Section titled “Type Parameters”T = unknown
Parameters
Section titled “Parameters”string
values
Section titled “values”…any[]
Returns
Section titled “Returns”PrismaPromise<T>
Example
Section titled “Example”const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')Read more in our docs.
Inherited from
Section titled “Inherited from”PrismaClient.$queryRawUnsafe
$transaction()
Section titled “$transaction()”Call Signature
Section titled “Call Signature”$transaction<
P>(arg,options?):Promise<UnwrapTuple<P>>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:224
Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
Type Parameters
Section titled “Type Parameters”P extends PrismaPromise<any>[]
Parameters
Section titled “Parameters”[...P[]]
options?
Section titled “options?”isolationLevel?
Section titled “isolationLevel?”TransactionIsolationLevel
maxWait?
Section titled “maxWait?”number
timeout?
Section titled “timeout?”number
Returns
Section titled “Returns”Promise<UnwrapTuple<P>>
Example
Section titled “Example”const [george, bob, alice] = await prisma.$transaction([ prisma.user.create({ data: { name: 'George' } }), prisma.user.create({ data: { name: 'Bob' } }), prisma.user.create({ data: { name: 'Alice' } }),])Read more in our docs.
Inherited from
Section titled “Inherited from”PrismaClient.$transaction
Call Signature
Section titled “Call Signature”$transaction<
R>(fn,options?):Promise<R>
Defined in: node_modules/.pnpm/@prisma+client@7.8.0_prisma@7.8.0_@types+react-dom@19.2.3_@types+react@19.2.15__@types+_ae629fb0908e65aad556d2cdbb07f041/node_modules/.prisma/client/index.d.ts:226
Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
Type Parameters
Section titled “Type Parameters”R
Parameters
Section titled “Parameters”(prisma) => Promise<R>
options?
Section titled “options?”isolationLevel?
Section titled “isolationLevel?”TransactionIsolationLevel
maxWait?
Section titled “maxWait?”number
timeout?
Section titled “timeout?”number
Returns
Section titled “Returns”Promise<R>
Example
Section titled “Example”const [george, bob, alice] = await prisma.$transaction([ prisma.user.create({ data: { name: 'George' } }), prisma.user.create({ data: { name: 'Bob' } }), prisma.user.create({ data: { name: 'Alice' } }),])Read more in our docs.
Inherited from
Section titled “Inherited from”PrismaClient.$transaction
ensureConnected()
Section titled “ensureConnected()”ensureConnected():
Promise<void>
Defined in: packages/database/src/prisma.service.ts:117
Optional pre-flight check: verifies DB connectivity before a batch operation. In profile=lite Prisma lazy-connects on the first query, so calling this is not required for correctness but lets callers fail-fast before a long operation.
Returns
Section titled “Returns”Promise<void>
onModuleDestroy()
Section titled “onModuleDestroy()”onModuleDestroy():
Promise<void>
Defined in: packages/database/src/prisma.service.ts:105
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”OnModuleDestroy.onModuleDestroy
onModuleInit()
Section titled “onModuleInit()”onModuleInit():
Promise<void>
Defined in: packages/database/src/prisma.service.ts:95
Module init: connect eagerly on profile-standard, defer on lite.
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”OnModuleInit.onModuleInit