@prisma/client-engine-runtime 7.10.0-dev.21 → 7.10.0-dev.22
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/index.d.mts +123 -91
- package/dist/index.d.ts +123 -91
- package/dist/index.js +254 -20
- package/dist/index.mjs +254 -20
- package/dist/interpreter/query-interpreter.d.ts +20 -1
- package/dist/query-plan.d.ts +61 -31
- package/package.json +9 -9
package/dist/query-plan.d.ts
CHANGED
|
@@ -76,12 +76,24 @@ export type JoinExpression = {
|
|
|
76
76
|
parentField: string;
|
|
77
77
|
isRelationUnique: boolean;
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Query plan nodes that are free of side effects and can be interpreted synchronously
|
|
81
|
+
* without touching the database. The `Rest` parameter controls what other nodes may
|
|
82
|
+
* appear in child positions: with the default `never` the tree is fully pure, while
|
|
83
|
+
* `PureQueryPlanNode<ImpureQueryPlanNode>` describes a tree of pure nodes that may
|
|
84
|
+
* contain impure nodes anywhere inside.
|
|
85
|
+
*/
|
|
86
|
+
export type PureQueryPlanNode<Rest = never> = {
|
|
80
87
|
type: 'value';
|
|
81
88
|
args: PrismaValue;
|
|
89
|
+
/**
|
|
90
|
+
* Present when this node is the result of evaluating an impure node during
|
|
91
|
+
* query plan purification. Never produced by the query compiler.
|
|
92
|
+
*/
|
|
93
|
+
lastInsertId?: string;
|
|
82
94
|
} | {
|
|
83
95
|
type: 'seq';
|
|
84
|
-
args:
|
|
96
|
+
args: (PureQueryPlanNode<Rest> | Rest)[];
|
|
85
97
|
} | {
|
|
86
98
|
type: 'get';
|
|
87
99
|
args: {
|
|
@@ -90,100 +102,118 @@ export type QueryPlanNode = {
|
|
|
90
102
|
} | {
|
|
91
103
|
type: 'let';
|
|
92
104
|
args: {
|
|
93
|
-
bindings:
|
|
94
|
-
|
|
105
|
+
bindings: {
|
|
106
|
+
name: string;
|
|
107
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
108
|
+
}[];
|
|
109
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
95
110
|
};
|
|
96
111
|
} | {
|
|
97
112
|
type: 'getFirstNonEmpty';
|
|
98
113
|
args: {
|
|
99
114
|
names: string[];
|
|
100
115
|
};
|
|
101
|
-
} | {
|
|
102
|
-
type: 'query';
|
|
103
|
-
args: QueryPlanDbQuery;
|
|
104
|
-
} | {
|
|
105
|
-
type: 'execute';
|
|
106
|
-
args: QueryPlanDbQuery;
|
|
107
116
|
} | {
|
|
108
117
|
type: 'reverse';
|
|
109
|
-
args:
|
|
118
|
+
args: PureQueryPlanNode<Rest> | Rest;
|
|
110
119
|
} | {
|
|
111
120
|
type: 'sum';
|
|
112
|
-
args:
|
|
121
|
+
args: (PureQueryPlanNode<Rest> | Rest)[];
|
|
113
122
|
} | {
|
|
114
123
|
type: 'concat';
|
|
115
|
-
args:
|
|
124
|
+
args: (PureQueryPlanNode<Rest> | Rest)[];
|
|
116
125
|
} | {
|
|
117
126
|
type: 'unique';
|
|
118
|
-
args:
|
|
127
|
+
args: PureQueryPlanNode<Rest> | Rest;
|
|
119
128
|
} | {
|
|
120
129
|
type: 'required';
|
|
121
|
-
args:
|
|
130
|
+
args: PureQueryPlanNode<Rest> | Rest;
|
|
122
131
|
} | {
|
|
123
132
|
type: 'join';
|
|
124
133
|
args: {
|
|
125
|
-
parent:
|
|
126
|
-
children:
|
|
134
|
+
parent: PureQueryPlanNode<Rest> | Rest;
|
|
135
|
+
children: {
|
|
136
|
+
child: PureQueryPlanNode<Rest> | Rest;
|
|
137
|
+
on: [left: string, right: string][];
|
|
138
|
+
parentField: string;
|
|
139
|
+
isRelationUnique: boolean;
|
|
140
|
+
}[];
|
|
127
141
|
canAssumeStrictEquality: boolean;
|
|
128
142
|
};
|
|
129
143
|
} | {
|
|
130
144
|
type: 'mapField';
|
|
131
145
|
args: {
|
|
132
146
|
field: string;
|
|
133
|
-
records:
|
|
147
|
+
records: PureQueryPlanNode<Rest> | Rest;
|
|
134
148
|
};
|
|
135
|
-
} | {
|
|
136
|
-
type: 'transaction';
|
|
137
|
-
args: QueryPlanNode;
|
|
138
149
|
} | {
|
|
139
150
|
type: 'dataMap';
|
|
140
151
|
args: {
|
|
141
|
-
expr:
|
|
152
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
142
153
|
structure: ResultNode;
|
|
143
154
|
enums: Record<string, Record<string, string>>;
|
|
144
155
|
};
|
|
145
156
|
} | {
|
|
146
157
|
type: 'validate';
|
|
147
158
|
args: {
|
|
148
|
-
expr:
|
|
159
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
149
160
|
rules: DataRule[];
|
|
150
161
|
} & ValidationError;
|
|
151
162
|
} | {
|
|
152
163
|
type: 'if';
|
|
153
164
|
args: {
|
|
154
|
-
value:
|
|
165
|
+
value: PureQueryPlanNode<Rest> | Rest;
|
|
155
166
|
rule: DataRule;
|
|
156
|
-
then:
|
|
157
|
-
else:
|
|
167
|
+
then: PureQueryPlanNode<Rest> | Rest;
|
|
168
|
+
else: PureQueryPlanNode<Rest> | Rest;
|
|
158
169
|
};
|
|
159
170
|
} | {
|
|
160
171
|
type: 'unit';
|
|
161
172
|
} | {
|
|
162
173
|
type: 'diff';
|
|
163
174
|
args: {
|
|
164
|
-
from:
|
|
165
|
-
to:
|
|
175
|
+
from: PureQueryPlanNode<Rest> | Rest;
|
|
176
|
+
to: PureQueryPlanNode<Rest> | Rest;
|
|
166
177
|
fields: string[];
|
|
167
178
|
};
|
|
168
179
|
} | {
|
|
169
180
|
type: 'initializeRecord';
|
|
170
181
|
args: {
|
|
171
|
-
expr:
|
|
182
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
172
183
|
fields: Record<string, FieldInitializer>;
|
|
173
184
|
};
|
|
174
185
|
} | {
|
|
175
186
|
type: 'mapRecord';
|
|
176
187
|
args: {
|
|
177
|
-
expr:
|
|
188
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
178
189
|
fields: Record<string, FieldOperation>;
|
|
179
190
|
};
|
|
180
191
|
} | {
|
|
181
192
|
type: 'process';
|
|
182
193
|
args: {
|
|
183
|
-
expr:
|
|
194
|
+
expr: PureQueryPlanNode<Rest> | Rest;
|
|
184
195
|
operations: InMemoryOps;
|
|
185
196
|
};
|
|
186
197
|
};
|
|
198
|
+
/**
|
|
199
|
+
* Query plan nodes that perform database I/O: individual queries and statements,
|
|
200
|
+
* and subtrees executed within a transaction.
|
|
201
|
+
*/
|
|
202
|
+
export type ImpureQueryPlanNode = {
|
|
203
|
+
type: 'query';
|
|
204
|
+
args: QueryPlanDbQuery;
|
|
205
|
+
} | {
|
|
206
|
+
type: 'execute';
|
|
207
|
+
args: QueryPlanDbQuery;
|
|
208
|
+
} | {
|
|
209
|
+
type: 'transaction';
|
|
210
|
+
args: QueryPlanNode;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* A query plan as emitted by the query compiler: a tree of pure nodes that may
|
|
214
|
+
* contain impure nodes anywhere inside.
|
|
215
|
+
*/
|
|
216
|
+
export type QueryPlanNode = ImpureQueryPlanNode | PureQueryPlanNode<ImpureQueryPlanNode>;
|
|
187
217
|
export type FieldInitializer = {
|
|
188
218
|
type: 'value';
|
|
189
219
|
value: PrismaValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/client-engine-runtime",
|
|
3
|
-
"version": "7.10.0-dev.
|
|
3
|
+
"version": "7.10.0-dev.22",
|
|
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,20 +31,20 @@
|
|
|
31
31
|
"nanoid": "5.1.5",
|
|
32
32
|
"ulid": "3.0.0",
|
|
33
33
|
"uuid": "14.0.0",
|
|
34
|
-
"@prisma/
|
|
35
|
-
"@prisma/
|
|
36
|
-
"@prisma/
|
|
37
|
-
"@prisma/
|
|
38
|
-
"@prisma/
|
|
39
|
-
"@prisma/json-protocol": "7.10.0-dev.
|
|
34
|
+
"@prisma/driver-adapter-utils": "7.10.0-dev.22",
|
|
35
|
+
"@prisma/client-runtime-utils": "7.10.0-dev.22",
|
|
36
|
+
"@prisma/debug": "7.10.0-dev.22",
|
|
37
|
+
"@prisma/sqlcommenter": "7.10.0-dev.22",
|
|
38
|
+
"@prisma/param-graph": "7.10.0-dev.22",
|
|
39
|
+
"@prisma/json-protocol": "7.10.0-dev.22"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@codspeed/benchmark.js-plugin": "4.0.0",
|
|
43
43
|
"@types/benchmark": "2.1.5",
|
|
44
44
|
"@types/node": "~20.19.24",
|
|
45
45
|
"benchmark": "2.1.4",
|
|
46
|
-
"@prisma/
|
|
47
|
-
"@prisma/
|
|
46
|
+
"@prisma/param-graph-builder": "7.10.0-dev.22",
|
|
47
|
+
"@prisma/get-dmmf": "7.10.0-dev.22"
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
|
50
50
|
"dist"
|