prisma 6.3.0-dev.2 → 6.3.0-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1428 -1346
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/package.json +16 -14
- package/preinstall/index.js +4 -4
- package/prisma-client/generator-build/index.js +42 -26
- package/prisma-client/package.json +8 -8
- package/prisma-client/runtime/binary.js +196 -120
- package/prisma-client/runtime/edge-esm.js +16 -16
- package/prisma-client/runtime/edge.js +16 -16
- package/prisma-client/runtime/library.d.ts +31 -14
- package/prisma-client/runtime/library.js +64 -62
- package/prisma-client/runtime/query_engine_bg.mysql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.postgresql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.sqlite.js +2 -2
- package/prisma-client/runtime/react-native.d.ts +31 -14
- package/prisma-client/runtime/react-native.js +28 -28
- package/prisma-client/scripts/default-index.js +3 -3
|
@@ -23,7 +23,7 @@ declare type AccelerateEngineConfig = {
|
|
|
23
23
|
|
|
24
24
|
export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
|
|
25
25
|
|
|
26
|
-
declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres'>;
|
|
26
|
+
declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres' | 'prisma+postgres'>;
|
|
27
27
|
|
|
28
28
|
export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum';
|
|
29
29
|
|
|
@@ -216,7 +216,7 @@ declare type ConnectionInfo = {
|
|
|
216
216
|
maxBindValues?: number;
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
-
declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb';
|
|
219
|
+
declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb';
|
|
220
220
|
|
|
221
221
|
declare interface Context {
|
|
222
222
|
/**
|
|
@@ -266,6 +266,8 @@ export declare type Count<O> = {
|
|
|
266
266
|
[K in keyof O]: Count<number>;
|
|
267
267
|
} & {};
|
|
268
268
|
|
|
269
|
+
export declare function createParam(name: string): Param<unknown, string>;
|
|
270
|
+
|
|
269
271
|
/**
|
|
270
272
|
* Custom fetch function for `DataProxyEngine`.
|
|
271
273
|
*
|
|
@@ -760,6 +762,7 @@ export declare namespace DMMF {
|
|
|
760
762
|
relationFromFields?: string[];
|
|
761
763
|
relationToFields?: string[];
|
|
762
764
|
relationOnDelete?: string;
|
|
765
|
+
relationOnUpdate?: string;
|
|
763
766
|
relationName?: string;
|
|
764
767
|
documentation?: string;
|
|
765
768
|
}>;
|
|
@@ -1528,7 +1531,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1528
1531
|
* @param values
|
|
1529
1532
|
* @returns
|
|
1530
1533
|
*/
|
|
1531
|
-
$executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
|
|
1534
|
+
$executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown, any>;
|
|
1532
1535
|
/**
|
|
1533
1536
|
* Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections
|
|
1534
1537
|
* @see https://github.com/prisma/prisma/issues/7142
|
|
@@ -1537,14 +1540,14 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1537
1540
|
* @param values
|
|
1538
1541
|
* @returns
|
|
1539
1542
|
*/
|
|
1540
|
-
$executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
|
|
1543
|
+
$executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown, any>;
|
|
1541
1544
|
/**
|
|
1542
1545
|
* Executes a raw command only for MongoDB
|
|
1543
1546
|
*
|
|
1544
1547
|
* @param command
|
|
1545
1548
|
* @returns
|
|
1546
1549
|
*/
|
|
1547
|
-
$runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown>;
|
|
1550
|
+
$runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown, any>;
|
|
1548
1551
|
/**
|
|
1549
1552
|
* Executes a raw query and returns selected data
|
|
1550
1553
|
*/
|
|
@@ -1557,12 +1560,12 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1557
1560
|
* @param values
|
|
1558
1561
|
* @returns
|
|
1559
1562
|
*/
|
|
1560
|
-
$queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
|
|
1563
|
+
$queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown, any>;
|
|
1561
1564
|
/**
|
|
1562
1565
|
* Counterpart to $queryRaw, that returns strongly typed results
|
|
1563
1566
|
* @param typedSql
|
|
1564
1567
|
*/
|
|
1565
|
-
$queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown>;
|
|
1568
|
+
$queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown, any>;
|
|
1566
1569
|
/**
|
|
1567
1570
|
* Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
|
|
1568
1571
|
* @see https://github.com/prisma/prisma/issues/7142
|
|
@@ -1571,7 +1574,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1571
1574
|
* @param values
|
|
1572
1575
|
* @returns
|
|
1573
1576
|
*/
|
|
1574
|
-
$queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
|
|
1577
|
+
$queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown, any>;
|
|
1575
1578
|
/**
|
|
1576
1579
|
* Execute a batch of requests in a transaction
|
|
1577
1580
|
* @param requests
|
|
@@ -2296,6 +2299,12 @@ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
|
|
|
2296
2299
|
};
|
|
2297
2300
|
}[A][B];
|
|
2298
2301
|
|
|
2302
|
+
export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>;
|
|
2303
|
+
|
|
2304
|
+
export declare type Param<out $Type, $Value extends string> = {
|
|
2305
|
+
readonly name: $Value;
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2299
2308
|
export declare type PatchFlat<O1, O2> = O1 & Omit_2<O2, keyof O1>;
|
|
2300
2309
|
|
|
2301
2310
|
export declare type Path<O, P, Default = never> = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path<O[K], R> : Default : O : never;
|
|
@@ -2413,6 +2422,12 @@ export declare class PrismaClientValidationError extends Error {
|
|
|
2413
2422
|
|
|
2414
2423
|
declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError;
|
|
2415
2424
|
|
|
2425
|
+
declare type PrismaOperationSpec<TArgs, TAction = string> = {
|
|
2426
|
+
args: TArgs;
|
|
2427
|
+
action: TAction;
|
|
2428
|
+
model: string;
|
|
2429
|
+
};
|
|
2430
|
+
|
|
2416
2431
|
export declare interface PrismaPromise<T> extends Promise<T> {
|
|
2417
2432
|
[Symbol.toStringTag]: 'PrismaPromise';
|
|
2418
2433
|
}
|
|
@@ -2422,26 +2437,27 @@ export declare interface PrismaPromise<T> extends Promise<T> {
|
|
|
2422
2437
|
* original `Promise` are optional so that it can be backwards-compatible.
|
|
2423
2438
|
* @see [[createPrismaPromise]]
|
|
2424
2439
|
*/
|
|
2425
|
-
declare interface PrismaPromise_2<
|
|
2440
|
+
declare interface PrismaPromise_2<TResult, TSpec extends PrismaOperationSpec<unknown> = any> extends Promise<TResult> {
|
|
2441
|
+
get spec(): TSpec;
|
|
2426
2442
|
/**
|
|
2427
2443
|
* Extension of the original `.then` function
|
|
2428
2444
|
* @param onfulfilled same as regular promises
|
|
2429
2445
|
* @param onrejected same as regular promises
|
|
2430
2446
|
* @param transaction transaction options
|
|
2431
2447
|
*/
|
|
2432
|
-
then<R1 =
|
|
2448
|
+
then<R1 = TResult, R2 = never>(onfulfilled?: (value: TResult) => R1 | PromiseLike<R1>, onrejected?: (error: unknown) => R2 | PromiseLike<R2>, transaction?: PrismaPromiseTransaction): Promise<R1 | R2>;
|
|
2433
2449
|
/**
|
|
2434
2450
|
* Extension of the original `.catch` function
|
|
2435
2451
|
* @param onrejected same as regular promises
|
|
2436
2452
|
* @param transaction transaction options
|
|
2437
2453
|
*/
|
|
2438
|
-
catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<
|
|
2454
|
+
catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<TResult | R>;
|
|
2439
2455
|
/**
|
|
2440
2456
|
* Extension of the original `.finally` function
|
|
2441
2457
|
* @param onfinally same as regular promises
|
|
2442
2458
|
* @param transaction transaction options
|
|
2443
2459
|
*/
|
|
2444
|
-
finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<
|
|
2460
|
+
finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<TResult>;
|
|
2445
2461
|
/**
|
|
2446
2462
|
* Called when executing a batch of regular tx
|
|
2447
2463
|
* @param transaction transaction options for batch tx
|
|
@@ -2457,7 +2473,7 @@ declare type PrismaPromiseBatchTransaction = {
|
|
|
2457
2473
|
lock: PromiseLike<void>;
|
|
2458
2474
|
};
|
|
2459
2475
|
|
|
2460
|
-
declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) =>
|
|
2476
|
+
declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise<unknown>;
|
|
2461
2477
|
|
|
2462
2478
|
/**
|
|
2463
2479
|
* Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which
|
|
@@ -2468,7 +2484,7 @@ declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) =>
|
|
|
2468
2484
|
* @see [[PrismaPromise]]
|
|
2469
2485
|
* @returns
|
|
2470
2486
|
*/
|
|
2471
|
-
declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2<unknown>;
|
|
2487
|
+
declare type PrismaPromiseFactory = <T extends PrismaOperationSpec<unknown>>(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2<unknown>;
|
|
2472
2488
|
|
|
2473
2489
|
declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
|
|
2474
2490
|
kind: 'itx';
|
|
@@ -2551,6 +2567,7 @@ declare interface QueryEngineConstructor {
|
|
|
2551
2567
|
declare type QueryEngineInstance = {
|
|
2552
2568
|
connect(headers: string, requestId: string): Promise<void>;
|
|
2553
2569
|
disconnect(headers: string, requestId: string): Promise<void>;
|
|
2570
|
+
compile(request: string, humanReadable: boolean): Promise<string>;
|
|
2554
2571
|
/**
|
|
2555
2572
|
* @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest`
|
|
2556
2573
|
* @param headersStr JSON.stringified `QueryEngineRequestHeaders`
|