@prisma/client-engine-runtime 6.6.0-dev.9 → 6.6.0-dev.90
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/dist/QueryPlan.d.ts +31 -2
- package/dist/crypto.d.ts +1 -0
- package/dist/index.d.mts +55 -21
- package/dist/index.d.ts +55 -21
- package/dist/index.js +248 -240
- package/dist/index.mjs +244 -238
- package/dist/interpreter/QueryInterpreter.d.ts +11 -4
- package/dist/interpreter/generators.d.ts +21 -0
- package/dist/interpreter/renderQuery.d.ts +3 -2
- package/dist/interpreter/renderQuery.test.d.ts +1 -0
- package/dist/transactionManager/Transaction.d.ts +1 -7
- package/dist/transactionManager/TransactionManager.d.ts +7 -6
- package/package.json +9 -4
- package/dist/interpreter/renderQueryTemplate.d.ts +0 -10
- /package/dist/interpreter/{renderQueryTemplate.test.d.ts → generators.test.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PrismaValue } from '../QueryPlan';
|
|
2
|
+
export declare class GeneratorRegistry {
|
|
3
|
+
#private;
|
|
4
|
+
constructor();
|
|
5
|
+
/**
|
|
6
|
+
* Returns a snapshot of the generator registry. It's 'frozen' in time at the moment of this
|
|
7
|
+
* method being called, meaning that the built-in time-based generators will always return
|
|
8
|
+
* the same value on repeated calls as long as the same snapshot is used.
|
|
9
|
+
*/
|
|
10
|
+
snapshot(): Readonly<GeneratorRegistrySnapshot>;
|
|
11
|
+
/**
|
|
12
|
+
* Registers a new generator with the given name.
|
|
13
|
+
*/
|
|
14
|
+
register(name: string, generator: ValueGenerator): void;
|
|
15
|
+
}
|
|
16
|
+
export interface GeneratorRegistrySnapshot {
|
|
17
|
+
[key: string]: ValueGenerator;
|
|
18
|
+
}
|
|
19
|
+
export interface ValueGenerator {
|
|
20
|
+
generate(...args: PrismaValue[]): PrismaValue;
|
|
21
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SqlQuery } from '@prisma/driver-adapter-utils';
|
|
2
|
-
import { QueryPlanDbQuery } from '../QueryPlan';
|
|
2
|
+
import type { QueryPlanDbQuery } from '../QueryPlan';
|
|
3
|
+
import { GeneratorRegistrySnapshot } from './generators';
|
|
3
4
|
import { ScopeBindings } from './scope';
|
|
4
|
-
export declare function renderQuery(
|
|
5
|
+
export declare function renderQuery(dbQuery: QueryPlanDbQuery, scope: ScopeBindings, generators: GeneratorRegistrySnapshot): SqlQuery;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
ReadUncommitted = "ReadUncommitted",
|
|
3
|
-
ReadCommitted = "ReadCommitted",
|
|
4
|
-
RepeatableRead = "RepeatableRead",
|
|
5
|
-
Snapshot = "Snapshot",
|
|
6
|
-
Serializable = "Serializable"
|
|
7
|
-
}
|
|
1
|
+
import type { IsolationLevel } from '@prisma/driver-adapter-utils';
|
|
8
2
|
export type Options = {
|
|
9
3
|
maxWait?: number;
|
|
10
4
|
timeout?: number;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SqlDriverAdapter, Transaction } from '@prisma/driver-adapter-utils';
|
|
2
2
|
import { Options, TransactionInfo } from './Transaction';
|
|
3
3
|
export declare class TransactionManager {
|
|
4
4
|
private transactions;
|
|
5
5
|
private closedTransactions;
|
|
6
6
|
private readonly driverAdapter;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
private readonly transactionOptions;
|
|
8
|
+
constructor({ driverAdapter, transactionOptions }: {
|
|
9
|
+
driverAdapter: SqlDriverAdapter;
|
|
10
|
+
transactionOptions: Options;
|
|
9
11
|
});
|
|
10
|
-
startTransaction(options
|
|
12
|
+
startTransaction(options?: Options): Promise<TransactionInfo>;
|
|
11
13
|
commitTransaction(transactionId: string): Promise<void>;
|
|
12
14
|
rollbackTransaction(transactionId: string): Promise<void>;
|
|
13
|
-
getTransaction(txInfo: TransactionInfo, operation: string):
|
|
15
|
+
getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
|
|
14
16
|
private getActiveTransaction;
|
|
15
17
|
cancelAllTransactions(): Promise<void>;
|
|
16
18
|
private startTransactionTimeout;
|
|
17
19
|
private closeTransaction;
|
|
18
20
|
private validateOptions;
|
|
19
|
-
private requiresSettingIsolationLevelFirst;
|
|
20
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.6.0-dev.
|
|
3
|
+
"version": "6.6.0-dev.90",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -20,12 +20,17 @@
|
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "https://github.com/prisma/prisma.git",
|
|
23
|
-
"directory": "packages/
|
|
23
|
+
"directory": "packages/client-engine-runtime"
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
27
|
+
"@bugsnag/cuid": "3.2.1",
|
|
28
|
+
"@paralleldrive/cuid2": "2.2.2",
|
|
29
|
+
"nanoid": "5.1.5",
|
|
30
|
+
"ulid": "3.0.0",
|
|
31
|
+
"uuid": "11.1.0",
|
|
32
|
+
"@prisma/debug": "6.6.0-dev.90",
|
|
33
|
+
"@prisma/driver-adapter-utils": "6.6.0-dev.90"
|
|
29
34
|
},
|
|
30
35
|
"devDependencies": {
|
|
31
36
|
"@types/jest": "29.5.14",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Value } from './scope';
|
|
2
|
-
/**
|
|
3
|
-
* A `QueryPlanDbQuery` in which all placeholders have been substituted with
|
|
4
|
-
* their values from the environment.
|
|
5
|
-
*/
|
|
6
|
-
export type QueryWithSubstitutedPlaceholders = {
|
|
7
|
-
query: string;
|
|
8
|
-
params: Value[];
|
|
9
|
-
};
|
|
10
|
-
export declare function renderQueryTemplate({ query, params, }: QueryWithSubstitutedPlaceholders): QueryWithSubstitutedPlaceholders;
|
|
File without changes
|