@prisma/client-engine-runtime 6.14.0-dev.4 → 6.14.0-dev.41
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/batch.d.ts +19 -0
- package/dist/index.d.mts +59 -14
- package/dist/index.d.ts +59 -14
- package/dist/index.js +784 -394
- package/dist/index.mjs +781 -394
- package/dist/interpreter/{DataMapper.d.ts → data-mapper.d.ts} +1 -1
- package/dist/interpreter/in-memory-processing.d.ts +3 -0
- package/dist/interpreter/{QueryInterpreter.d.ts → query-interpreter.d.ts} +6 -4
- package/dist/interpreter/{renderQuery.d.ts → render-query.d.ts} +2 -2
- package/dist/interpreter/validation.d.ts +1 -1
- package/dist/json-protocol.d.ts +5 -0
- package/dist/{QueryPlan.d.ts → query-plan.d.ts} +16 -12
- package/dist/raw-json-protocol.d.ts +6 -0
- package/dist/{transactionManager/TransactionManagerErrors.d.ts → transaction-manager/transaction-manager-error.d.ts} +1 -1
- package/dist/{transactionManager/TransactionManager.d.ts → transaction-manager/transaction-manager.d.ts} +1 -1
- package/dist/transaction-manager/transaction-manager.test.d.ts +1 -0
- package/dist/{UserFacingError.d.ts → user-facing-error.d.ts} +1 -0
- package/package.json +3 -3
- /package/dist/interpreter/{renderQuery.test.d.ts → render-query.test.d.ts} +0 -0
- /package/dist/interpreter/{serializeSql.d.ts → serialize-sql.d.ts} +0 -0
- /package/dist/interpreter/{serializeSql.test.d.ts → serialize-sql.test.d.ts} +0 -0
- /package/dist/{transactionManager/TransactionManager.test.d.ts → json-protocol.test.d.ts} +0 -0
- /package/dist/{transactionManager/Transaction.d.ts → transaction-manager/transaction.d.ts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SqlQueryable, SqlResultSet } from '@prisma/driver-adapter-utils';
|
|
1
|
+
import { ConnectionInfo, SqlQueryable, SqlResultSet } from '@prisma/driver-adapter-utils';
|
|
2
2
|
import { QueryEvent } from '../events';
|
|
3
|
-
import { QueryPlanNode } from '../
|
|
3
|
+
import { QueryPlanNode } from '../query-plan';
|
|
4
4
|
import { type SchemaProvider } from '../schema';
|
|
5
5
|
import { type TracingHelper } from '../tracing';
|
|
6
|
-
import { type TransactionManager } from '../
|
|
6
|
+
import { type TransactionManager } from '../transaction-manager/transaction-manager';
|
|
7
7
|
import { Value } from './scope';
|
|
8
8
|
export type QueryInterpreterTransactionManager = {
|
|
9
9
|
enabled: true;
|
|
@@ -19,16 +19,18 @@ export type QueryInterpreterOptions = {
|
|
|
19
19
|
serializer: (results: SqlResultSet) => Value;
|
|
20
20
|
rawSerializer?: (results: SqlResultSet) => Value;
|
|
21
21
|
provider?: SchemaProvider;
|
|
22
|
+
connectionInfo?: ConnectionInfo;
|
|
22
23
|
};
|
|
23
24
|
export declare class QueryInterpreter {
|
|
24
25
|
#private;
|
|
25
|
-
constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, provider, }: QueryInterpreterOptions);
|
|
26
|
+
constructor({ transactionManager, placeholderValues, onQuery, tracingHelper, serializer, rawSerializer, provider, connectionInfo, }: QueryInterpreterOptions);
|
|
26
27
|
static forSql(options: {
|
|
27
28
|
transactionManager: QueryInterpreterTransactionManager;
|
|
28
29
|
placeholderValues: Record<string, unknown>;
|
|
29
30
|
onQuery?: (event: QueryEvent) => void;
|
|
30
31
|
tracingHelper: TracingHelper;
|
|
31
32
|
provider?: SchemaProvider;
|
|
33
|
+
connectionInfo?: ConnectionInfo;
|
|
32
34
|
}): QueryInterpreter;
|
|
33
35
|
run(queryPlan: QueryPlanNode, queryable: SqlQueryable): Promise<unknown>;
|
|
34
36
|
private interpretNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SqlQuery } from '@prisma/driver-adapter-utils';
|
|
2
|
-
import type { PrismaValue, QueryPlanDbQuery } from '../
|
|
2
|
+
import type { PrismaValue, QueryPlanDbQuery } from '../query-plan';
|
|
3
3
|
import { GeneratorRegistrySnapshot } from './generators';
|
|
4
4
|
import { ScopeBindings } from './scope';
|
|
5
|
-
export declare function renderQuery(dbQuery: QueryPlanDbQuery, scope: ScopeBindings, generators: GeneratorRegistrySnapshot): SqlQuery;
|
|
5
|
+
export declare function renderQuery(dbQuery: QueryPlanDbQuery, scope: ScopeBindings, generators: GeneratorRegistrySnapshot, maxChunkSize?: number): SqlQuery[];
|
|
6
6
|
export declare function evaluateParam(param: PrismaValue, scope: ScopeBindings, generators: GeneratorRegistrySnapshot): unknown;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DataRule, ValidationError } from '../
|
|
1
|
+
import { DataRule, ValidationError } from '../query-plan';
|
|
2
2
|
export declare function performValidation(data: unknown, rules: DataRule[], error: ValidationError): void;
|
|
3
3
|
export declare function doesSatisfyRule(data: unknown, rule: DataRule): boolean;
|
package/dist/json-protocol.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Decimal } from 'decimal.js';
|
|
1
2
|
export type DateTaggedValue = {
|
|
2
3
|
$type: 'DateTime';
|
|
3
4
|
value: string;
|
|
@@ -30,4 +31,8 @@ export type JsonTaggedValue = {
|
|
|
30
31
|
};
|
|
31
32
|
export type JsonInputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | FieldRefTaggedValue | JsonTaggedValue | EnumTaggedValue;
|
|
32
33
|
export type JsonOutputTaggedValue = DateTaggedValue | DecimalTaggedValue | BytesTaggedValue | BigIntTaggedValue | JsonTaggedValue;
|
|
34
|
+
export type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
|
|
35
|
+
[key: string]: JsOutputValue;
|
|
36
|
+
};
|
|
33
37
|
export declare function normalizeJsonProtocolValues(result: unknown): unknown;
|
|
38
|
+
export declare function deserializeJsonResponse(result: unknown): unknown;
|
|
@@ -46,6 +46,8 @@ export type PrismaValueType = {
|
|
|
46
46
|
} | {
|
|
47
47
|
type: 'Array';
|
|
48
48
|
inner: PrismaValueType;
|
|
49
|
+
} | {
|
|
50
|
+
type: 'Json';
|
|
49
51
|
} | {
|
|
50
52
|
type: 'Object';
|
|
51
53
|
} | {
|
|
@@ -60,6 +62,7 @@ export type ResultNode = {
|
|
|
60
62
|
type: 'Object';
|
|
61
63
|
fields: Record<string, ResultNode>;
|
|
62
64
|
serializedName: string | null;
|
|
65
|
+
skipNulls: boolean;
|
|
63
66
|
} | {
|
|
64
67
|
type: 'Value';
|
|
65
68
|
dbName: string;
|
|
@@ -78,6 +81,7 @@ export type QueryPlanDbQuery = {
|
|
|
78
81
|
fragments: Fragment[];
|
|
79
82
|
placeholderFormat: PlaceholderFormat;
|
|
80
83
|
params: PrismaValue[];
|
|
84
|
+
chunkable: boolean;
|
|
81
85
|
};
|
|
82
86
|
export type Fragment = {
|
|
83
87
|
type: 'stringChunk';
|
|
@@ -190,18 +194,6 @@ export type QueryPlanNode = {
|
|
|
190
194
|
from: QueryPlanNode;
|
|
191
195
|
to: QueryPlanNode;
|
|
192
196
|
};
|
|
193
|
-
} | {
|
|
194
|
-
type: 'distinctBy';
|
|
195
|
-
args: {
|
|
196
|
-
expr: QueryPlanNode;
|
|
197
|
-
fields: string[];
|
|
198
|
-
};
|
|
199
|
-
} | {
|
|
200
|
-
type: 'paginate';
|
|
201
|
-
args: {
|
|
202
|
-
expr: QueryPlanNode;
|
|
203
|
-
pagination: Pagination;
|
|
204
|
-
};
|
|
205
197
|
} | {
|
|
206
198
|
type: 'initializeRecord';
|
|
207
199
|
args: {
|
|
@@ -214,6 +206,12 @@ export type QueryPlanNode = {
|
|
|
214
206
|
expr: QueryPlanNode;
|
|
215
207
|
fields: Record<string, FieldOperation>;
|
|
216
208
|
};
|
|
209
|
+
} | {
|
|
210
|
+
type: 'process';
|
|
211
|
+
args: {
|
|
212
|
+
expr: QueryPlanNode;
|
|
213
|
+
operations: InMemoryOps;
|
|
214
|
+
};
|
|
217
215
|
};
|
|
218
216
|
export type FieldInitializer = {
|
|
219
217
|
type: 'value';
|
|
@@ -241,7 +239,13 @@ export type Pagination = {
|
|
|
241
239
|
cursor: Record<string, PrismaValue> | null;
|
|
242
240
|
take: number | null;
|
|
243
241
|
skip: number | null;
|
|
242
|
+
};
|
|
243
|
+
export type InMemoryOps = {
|
|
244
|
+
pagination: Pagination | null;
|
|
245
|
+
distinct: string[] | null;
|
|
246
|
+
reverse: boolean;
|
|
244
247
|
linkingFields: string[] | null;
|
|
248
|
+
nested: Record<string, InMemoryOps>;
|
|
245
249
|
};
|
|
246
250
|
export type DataRule = {
|
|
247
251
|
type: 'rowCountEq';
|
|
@@ -2,7 +2,7 @@ import { SqlDriverAdapter, Transaction } from '@prisma/driver-adapter-utils';
|
|
|
2
2
|
import { QueryEvent } from '../events';
|
|
3
3
|
import type { SchemaProvider } from '../schema';
|
|
4
4
|
import { TracingHelper } from '../tracing';
|
|
5
|
-
import { Options, TransactionInfo } from './
|
|
5
|
+
import { Options, TransactionInfo } from './transaction';
|
|
6
6
|
export declare class TransactionManager {
|
|
7
7
|
#private;
|
|
8
8
|
private transactions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "6.14.0-dev.
|
|
3
|
+
"version": "6.14.0-dev.41",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"nanoid": "5.1.5",
|
|
32
32
|
"ulid": "3.0.0",
|
|
33
33
|
"uuid": "11.1.0",
|
|
34
|
-
"@prisma/debug": "6.14.0-dev.
|
|
35
|
-
"@prisma/driver-adapter-utils": "6.14.0-dev.
|
|
34
|
+
"@prisma/debug": "6.14.0-dev.41",
|
|
35
|
+
"@prisma/driver-adapter-utils": "6.14.0-dev.41"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "29.5.14",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|