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

class.ts

241 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 } =
48 await import('@prisma/client/runtime/query_compiler_bg.sqlite.wasm-base64.mjs')
49 return await decodeBase64AsWasm(wasm)
50 },
52​
53export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
54 'log' extends keyof ClientOptions
55 ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition>
56 ? Prisma.GetEvents<ClientOptions['log']>
57 : never
58 : never
59​
60export interface PrismaClientConstructor {
61 /**
62 * ## Prisma Client
63 *
64 * Type-safe database client for TypeScript
65 * @example
66 * ```
67 * const prisma = new PrismaClient()
68 * // Fetch zero or more Users
69 * const users = await prisma.user.findMany()
70 * ```
71 *
72 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
73 */
74​
75 new <
76 Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
77 LogOpts extends LogOptions<Options> = LogOptions<Options>,
78 OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends {
79 omit: infer U
80 }
81 ? U
82 : Prisma.PrismaClientOptions['omit'],
83 ExtArgs extends runtime.Types.Extensions.InternalArgs =
84 runtime.Types.Extensions.DefaultArgs,
85 >(
86 options: Prisma.Subset<Options, Prisma.PrismaClientOptions>,
87 ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
89​
90/**
91 * ## Prisma Client
92 *
93 * Type-safe database client for TypeScript
94 * @example
95 * ```
96 * const prisma = new PrismaClient()
97 * // Fetch zero or more Users
98 * const users = await prisma.user.findMany()
99 * ```
100 *
101 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
102 */
103​
104export interface PrismaClient<
105 in LogOpts extends Prisma.LogLevel = never,
106 in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
107 in out ExtArgs extends runtime.Types.Extensions.InternalArgs =
108 runtime.Types.Extensions.DefaultArgs,
109> {
110 [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
111​
112 $on<V extends LogOpts>(
113 eventType: V,
114 callback: (
115 event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent,
116 ) => void,
117 ): PrismaClient
118​
119 /**
120 * Connect with the database
121 */
122 $connect(): runtime.Types.Utils.JsPromise<void>
123​
124 /**
125 * Disconnect from the database
126 */
127 $disconnect(): runtime.Types.Utils.JsPromise<void>
128​
129 /**
130 * Executes a prepared raw query and returns the number of affected rows.
131 * @example
132 * ```
133 * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
134 * ```
135 *
136 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
137 */
138 $executeRaw<T = unknown>(
139 query: TemplateStringsArray | Prisma.Sql,
140 ...values: any[]
141 ): Prisma.PrismaPromise<number>
142​
143 /**
144 * Executes a raw query and returns the number of affected rows.
145 * Susceptible to SQL injections, see documentation.
146 * @example
147 * ```
148 * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
149 * ```
150 *
151 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
152 */
153 $executeRawUnsafe<T = unknown>(
154 query: string,
155 ...values: any[]
156 ): Prisma.PrismaPromise<number>
157​
158 /**
159 * Performs a prepared raw query and returns the `SELECT` data.
160 * @example
161 * ```
162 * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
163 * ```
164 *
165 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
166 */
167 $queryRaw<T = unknown>(
168 query: TemplateStringsArray | Prisma.Sql,
169 ...values: any[]
170 ): Prisma.PrismaPromise<T>
171​
172 /**
173 * Performs a raw query and returns the `SELECT` data.
174 * Susceptible to SQL injections, see documentation.
175 * @example
176 * ```
177 * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
178 * ```
179 *
180 * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
181 */
182 $queryRawUnsafe<T = unknown>(
183 query: string,
184 ...values: any[]
185 ): Prisma.PrismaPromise<T>
186​
187 /**
188 * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
189 * @example
190 * ```
191 * const [george, bob, alice] = await prisma.$transaction([
192 * prisma.user.create({ data: { name: 'George' } }),
193 * prisma.user.create({ data: { name: 'Bob' } }),
194 * prisma.user.create({ data: { name: 'Alice' } }),
195 * ])
196 * ```
197 *
198 * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
199 */
200 $transaction<P extends Prisma.PrismaPromise<any>[]>(
201 arg: [...P],
202 options?: { isolationLevel?: Prisma.TransactionIsolationLevel },
203 ): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
204​
205 $transaction<R>(
206 fn: (
207 prisma: Omit<PrismaClient, runtime.ITXClientDenyList>,
208 ) => runtime.Types.Utils.JsPromise<R>,
209 options?: {
210 maxWait?: number
211 timeout?: number
212 isolationLevel?: Prisma.TransactionIsolationLevel
213 },
214 ): runtime.Types.Utils.JsPromise<R>
215​
216 $extends: runtime.Types.Extensions.ExtendsHook<
217 'extends',
218 Prisma.TypeMapCb<OmitOpts>,
219 ExtArgs,
220 runtime.Types.Utils.Call<
221 Prisma.TypeMapCb<OmitOpts>,
222 {
223 extArgs: ExtArgs
224 }
225 >
226 >
227​
228 /**
229 * `prisma.user`: Exposes CRUD operations for the **User** model.
230 * Example usage:
231 * ```ts
232 * // Fetch zero or more Users
233 * const users = await prisma.user.findMany()
234 * ```
235 */
236 get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>
238​
239export function getPrismaClientClass(): PrismaClientConstructor {
240 return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor