Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

class.ts

242 lines7.5 KB

1/* !!! This is code generated by Prisma. Do not edit directly. !!! */
2/* eslint-disable */
3// biome-ignore-all lint: generated file
4// @ts-nocheck
5/*
6 * WARNING: This is an internal file that is subject to change!
7 *
8 * πŸ›‘ Under no circumstances should you import this file directly! πŸ›‘
9 *
10 * Please import the `PrismaClient` class from the `client.ts` file instead.
11 */
12​
13import * as runtime from '@prisma/client/runtime/client'
14import type * as Prisma from './prismaNamespace'
15​
16const config: runtime.GetPrismaClientConfig = {
17 previewFeatures: [],
18 clientVersion: '7.0.0',
19 engineVersion: '0c19ccc313cf9911a90d99d2ac2eb0280c76c513',
20 activeProvider: 'sqlite',
21 inlineSchema:
22 '// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = "prisma-client"\n output = "../src/prisma-generated"\n}\n\ndatasource db {\n provider = "sqlite"\n}\n\nmodel User {\n email String @id @unique\n password String\n}\n',
23 runtimeDataModel: {
24 models: {},
25 enums: {},
26 types: {},
27 },
29​
30config.runtimeDataModel = JSON.parse(
31 '{"models":{"User":{"fields":[{"name":"email","kind":"scalar","type":"String"},{"name":"password","kind":"scalar","type":"String"}],"dbName":null}},"enums":{},"types":{}}',
33​
34async function decodeBase64AsWasm(
35 wasmBase64: string,
36): Promise<WebAssembly.Module> {
37 const { Buffer } = await import('node:buffer')
38 const wasmArray = Buffer.from(wasmBase64, 'base64')
39 return new WebAssembly.Module(wasmArray)
41​
42config.compilerWasm = {
43 getRuntime: async () =>
44 await import('@prisma/client/runtime/query_compiler_bg.sqlite.mjs'),
45​
46 getQueryCompilerWasmModule: async () => {
47 const { wasm } = await import(
48 '@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs'
49 )
50 return await decodeBase64AsWasm(wasm)
51 },
53​
54export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
55 'log' extends keyof ClientOptions
56 ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition>
57 ? Prisma.GetEvents<ClientOptions['log']>
58 : never
59 : never
60​
61export interface PrismaClientConstructor {
62 /**
63 * ## Prisma Client
64 *
65 * Type-safe database client for TypeScript
66 * @example
67 * ```
68 * const prisma = new PrismaClient()
69 * // Fetch zero or more Users
70 * const users = await prisma.user.findMany()
71 * ```
72 *
73 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
74 */
75​
76 new <
77 Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
78 LogOpts extends LogOptions<Options> = LogOptions<Options>,
79 OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends {
80 omit: infer U
81 }
82 ? U
83 : Prisma.PrismaClientOptions['omit'],
84 ExtArgs extends
85 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
86 >(
87 options: Prisma.Subset<Options, Prisma.PrismaClientOptions>,
88 ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
90​
91/**
92 * ## Prisma Client
93 *
94 * Type-safe database client for TypeScript
95 * @example
96 * ```
97 * const prisma = new PrismaClient()
98 * // Fetch zero or more Users
99 * const users = await prisma.user.findMany()
100 * ```
101 *
102 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
103 */
104​
105export interface PrismaClient<
106 in LogOpts extends Prisma.LogLevel = never,
107 in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
108 in out ExtArgs extends
109 runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
110> {
111 [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
112​
113 $on<V extends LogOpts>(
114 eventType: V,
115 callback: (
116 event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent,
117 ) => void,
118 ): PrismaClient
119​
120 /**
121 * Connect with the database
122 */
123 $connect(): runtime.Types.Utils.JsPromise<void>
124​
125 /**
126 * Disconnect from the database
127 */
128 $disconnect(): runtime.Types.Utils.JsPromise<void>
129​
130 /**
131 * Executes a prepared raw query and returns the number of affected rows.
132 * @example
133 * ```
134 * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
135 * ```
136 *
137 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
138 */
139 $executeRaw<T = unknown>(
140 query: TemplateStringsArray | Prisma.Sql,
141 ...values: any[]
142 ): Prisma.PrismaPromise<number>
143​
144 /**
145 * Executes a raw query and returns the number of affected rows.
146 * Susceptible to SQL injections, see documentation.
147 * @example
148 * ```
149 * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
150 * ```
151 *
152 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
153 */
154 $executeRawUnsafe<T = unknown>(
155 query: string,
156 ...values: any[]
157 ): Prisma.PrismaPromise<number>
158​
159 /**
160 * Performs a prepared raw query and returns the `SELECT` data.
161 * @example
162 * ```
163 * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
164 * ```
165 *
166 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
167 */
168 $queryRaw<T = unknown>(
169 query: TemplateStringsArray | Prisma.Sql,
170 ...values: any[]
171 ): Prisma.PrismaPromise<T>
172​
173 /**
174 * Performs a raw query and returns the `SELECT` data.
175 * Susceptible to SQL injections, see documentation.
176 * @example
177 * ```
178 * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
179 * ```
180 *
181 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
182 */
183 $queryRawUnsafe<T = unknown>(
184 query: string,
185 ...values: any[]
186 ): Prisma.PrismaPromise<T>
187​
188 /**
189 * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
190 * @example
191 * ```
192 * const [george, bob, alice] = await prisma.$transaction([
193 * prisma.user.create({ data: { name: 'George' } }),
194 * prisma.user.create({ data: { name: 'Bob' } }),
195 * prisma.user.create({ data: { name: 'Alice' } }),
196 * ])
197 * ```
198 *
199 * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
200 */
201 $transaction<P extends Prisma.PrismaPromise<any>[]>(
202 arg: [...P],
203 options?: { isolationLevel?: Prisma.TransactionIsolationLevel },
204 ): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
205​
206 $transaction<R>(
207 fn: (
208 prisma: Omit<PrismaClient, runtime.ITXClientDenyList>,
209 ) => runtime.Types.Utils.JsPromise<R>,
210 options?: {
211 maxWait?: number
212 timeout?: number
213 isolationLevel?: Prisma.TransactionIsolationLevel
214 },
215 ): runtime.Types.Utils.JsPromise<R>
216​
217 $extends: runtime.Types.Extensions.ExtendsHook<
218 'extends',
219 Prisma.TypeMapCb<OmitOpts>,
220 ExtArgs,
221 runtime.Types.Utils.Call<
222 Prisma.TypeMapCb<OmitOpts>,
223 {
224 extArgs: ExtArgs
225 }
226 >
227 >
228​
229 /**
230 * `prisma.user`: Exposes CRUD operations for the **User** model.
231 * Example usage:
232 * ```ts
233 * // Fetch zero or more Users
234 * const users = await prisma.user.findMany()
235 * ```
236 */
237 get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>
239​
240export function getPrismaClientClass(): PrismaClientConstructor {
241 return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor