@prisma/param-graph 7.3.0-integration-parameterization.7 → 7.3.0-integration-parameterization.8
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/param-graph.d.ts +20 -15
- package/dist/param-graph.js +29 -23
- package/dist/param-graph.mjs +29 -23
- package/package.json +1 -1
package/dist/param-graph.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export type ParamGraph = {
|
|
|
19
19
|
* User enum names for runtime membership checks.
|
|
20
20
|
* Values are looked up via `runtimeDataModel.enums[enumName].values`.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
e: string[];
|
|
23
23
|
/**
|
|
24
24
|
* Input nodes used for argument objects and input types.
|
|
25
25
|
* Each node describes which fields are parameterizable or lead to
|
|
@@ -119,27 +119,31 @@ export declare const EdgeFlag: {
|
|
|
119
119
|
* Check ScalarMask to validate the value type.
|
|
120
120
|
*/
|
|
121
121
|
readonly ParamScalar: 1;
|
|
122
|
+
/**
|
|
123
|
+
* Field may be parameterized as an enum.
|
|
124
|
+
* Check enum ID to validate the value type.
|
|
125
|
+
*/
|
|
126
|
+
readonly ParamEnum: 2;
|
|
122
127
|
/**
|
|
123
128
|
* Field accepts list-of-scalar values.
|
|
124
129
|
* Parameterize the whole list if all elements match ScalarMask.
|
|
125
130
|
*/
|
|
126
|
-
readonly
|
|
131
|
+
readonly ParamListScalar: 4;
|
|
132
|
+
/**
|
|
133
|
+
* Field accepts list-of-enum values.
|
|
134
|
+
* Parameterize the whole list if all elements match enum ID.
|
|
135
|
+
*/
|
|
136
|
+
readonly ParamListEnum: 8;
|
|
127
137
|
/**
|
|
128
138
|
* Field accepts list-of-object values.
|
|
129
139
|
* Recurse into each element using the child node.
|
|
130
140
|
*/
|
|
131
|
-
readonly ListObject:
|
|
141
|
+
readonly ListObject: 16;
|
|
132
142
|
/**
|
|
133
143
|
* Field accepts object values.
|
|
134
144
|
* Recurse into child input node.
|
|
135
145
|
*/
|
|
136
|
-
readonly Object:
|
|
137
|
-
/**
|
|
138
|
-
* Field accepts null as a valid value.
|
|
139
|
-
* Note: Null values are NEVER parameterized at runtime regardless of this flag.
|
|
140
|
-
* This flag is informational only (reflects isNullable from DMMF).
|
|
141
|
-
*/
|
|
142
|
-
readonly Nullable: 16;
|
|
146
|
+
readonly Object: 32;
|
|
143
147
|
};
|
|
144
148
|
export type EdgeFlagValue = (typeof EdgeFlag)[keyof typeof EdgeFlag];
|
|
145
149
|
/**
|
|
@@ -148,13 +152,14 @@ export type EdgeFlagValue = (typeof EdgeFlag)[keyof typeof EdgeFlag];
|
|
|
148
152
|
*/
|
|
149
153
|
export declare const ScalarMask: {
|
|
150
154
|
readonly String: 1;
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
155
|
+
readonly Int: 2;
|
|
156
|
+
readonly BigInt: 4;
|
|
157
|
+
readonly Float: 8;
|
|
154
158
|
readonly Decimal: 16;
|
|
155
|
-
readonly
|
|
156
|
-
readonly
|
|
159
|
+
readonly Boolean: 32;
|
|
160
|
+
readonly DateTime: 64;
|
|
157
161
|
readonly Json: 128;
|
|
162
|
+
readonly Bytes: 256;
|
|
158
163
|
};
|
|
159
164
|
export type ScalarMaskValue = (typeof ScalarMask)[keyof typeof ScalarMask];
|
|
160
165
|
/**
|
package/dist/param-graph.js
CHANGED
|
@@ -31,38 +31,42 @@ const EdgeFlag = {
|
|
|
31
31
|
* Check ScalarMask to validate the value type.
|
|
32
32
|
*/
|
|
33
33
|
ParamScalar: 1,
|
|
34
|
+
/**
|
|
35
|
+
* Field may be parameterized as an enum.
|
|
36
|
+
* Check enum ID to validate the value type.
|
|
37
|
+
*/
|
|
38
|
+
ParamEnum: 2,
|
|
34
39
|
/**
|
|
35
40
|
* Field accepts list-of-scalar values.
|
|
36
41
|
* Parameterize the whole list if all elements match ScalarMask.
|
|
37
42
|
*/
|
|
38
|
-
|
|
43
|
+
ParamListScalar: 4,
|
|
44
|
+
/**
|
|
45
|
+
* Field accepts list-of-enum values.
|
|
46
|
+
* Parameterize the whole list if all elements match enum ID.
|
|
47
|
+
*/
|
|
48
|
+
ParamListEnum: 8,
|
|
39
49
|
/**
|
|
40
50
|
* Field accepts list-of-object values.
|
|
41
51
|
* Recurse into each element using the child node.
|
|
42
52
|
*/
|
|
43
|
-
ListObject:
|
|
53
|
+
ListObject: 16,
|
|
44
54
|
/**
|
|
45
55
|
* Field accepts object values.
|
|
46
56
|
* Recurse into child input node.
|
|
47
57
|
*/
|
|
48
|
-
Object:
|
|
49
|
-
/**
|
|
50
|
-
* Field accepts null as a valid value.
|
|
51
|
-
* Note: Null values are NEVER parameterized at runtime regardless of this flag.
|
|
52
|
-
* This flag is informational only (reflects isNullable from DMMF).
|
|
53
|
-
*/
|
|
54
|
-
Nullable: 16
|
|
58
|
+
Object: 32
|
|
55
59
|
};
|
|
56
60
|
const ScalarMask = {
|
|
57
61
|
String: 1,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
DateTime: 8,
|
|
62
|
+
Int: 2,
|
|
63
|
+
BigInt: 4,
|
|
64
|
+
Float: 8,
|
|
62
65
|
Decimal: 16,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Json: 128
|
|
66
|
+
Boolean: 32,
|
|
67
|
+
DateTime: 64,
|
|
68
|
+
Json: 128,
|
|
69
|
+
Bytes: 256
|
|
66
70
|
};
|
|
67
71
|
function hasFlag(edge, flag) {
|
|
68
72
|
return (edge.k & flag) !== 0;
|
|
@@ -73,22 +77,24 @@ function getScalarMask(edge) {
|
|
|
73
77
|
function scalarTypeToMask(typeName) {
|
|
74
78
|
switch (typeName) {
|
|
75
79
|
case "String":
|
|
80
|
+
case "UUID":
|
|
76
81
|
return ScalarMask.String;
|
|
77
82
|
case "Int":
|
|
83
|
+
return ScalarMask.Int;
|
|
84
|
+
case "BigInt":
|
|
85
|
+
return ScalarMask.BigInt;
|
|
78
86
|
case "Float":
|
|
79
|
-
return ScalarMask.
|
|
87
|
+
return ScalarMask.Float;
|
|
88
|
+
case "Decimal":
|
|
89
|
+
return ScalarMask.Decimal;
|
|
80
90
|
case "Boolean":
|
|
81
91
|
return ScalarMask.Boolean;
|
|
82
92
|
case "DateTime":
|
|
83
93
|
return ScalarMask.DateTime;
|
|
84
|
-
case "Decimal":
|
|
85
|
-
return ScalarMask.Decimal;
|
|
86
|
-
case "BigInt":
|
|
87
|
-
return ScalarMask.BigInt;
|
|
88
|
-
case "Bytes":
|
|
89
|
-
return ScalarMask.Bytes;
|
|
90
94
|
case "Json":
|
|
91
95
|
return ScalarMask.Json;
|
|
96
|
+
case "Bytes":
|
|
97
|
+
return ScalarMask.Bytes;
|
|
92
98
|
default:
|
|
93
99
|
return 0;
|
|
94
100
|
}
|
package/dist/param-graph.mjs
CHANGED
|
@@ -4,38 +4,42 @@ const EdgeFlag = {
|
|
|
4
4
|
* Check ScalarMask to validate the value type.
|
|
5
5
|
*/
|
|
6
6
|
ParamScalar: 1,
|
|
7
|
+
/**
|
|
8
|
+
* Field may be parameterized as an enum.
|
|
9
|
+
* Check enum ID to validate the value type.
|
|
10
|
+
*/
|
|
11
|
+
ParamEnum: 2,
|
|
7
12
|
/**
|
|
8
13
|
* Field accepts list-of-scalar values.
|
|
9
14
|
* Parameterize the whole list if all elements match ScalarMask.
|
|
10
15
|
*/
|
|
11
|
-
|
|
16
|
+
ParamListScalar: 4,
|
|
17
|
+
/**
|
|
18
|
+
* Field accepts list-of-enum values.
|
|
19
|
+
* Parameterize the whole list if all elements match enum ID.
|
|
20
|
+
*/
|
|
21
|
+
ParamListEnum: 8,
|
|
12
22
|
/**
|
|
13
23
|
* Field accepts list-of-object values.
|
|
14
24
|
* Recurse into each element using the child node.
|
|
15
25
|
*/
|
|
16
|
-
ListObject:
|
|
26
|
+
ListObject: 16,
|
|
17
27
|
/**
|
|
18
28
|
* Field accepts object values.
|
|
19
29
|
* Recurse into child input node.
|
|
20
30
|
*/
|
|
21
|
-
Object:
|
|
22
|
-
/**
|
|
23
|
-
* Field accepts null as a valid value.
|
|
24
|
-
* Note: Null values are NEVER parameterized at runtime regardless of this flag.
|
|
25
|
-
* This flag is informational only (reflects isNullable from DMMF).
|
|
26
|
-
*/
|
|
27
|
-
Nullable: 16
|
|
31
|
+
Object: 32
|
|
28
32
|
};
|
|
29
33
|
const ScalarMask = {
|
|
30
34
|
String: 1,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
DateTime: 8,
|
|
35
|
+
Int: 2,
|
|
36
|
+
BigInt: 4,
|
|
37
|
+
Float: 8,
|
|
35
38
|
Decimal: 16,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Json: 128
|
|
39
|
+
Boolean: 32,
|
|
40
|
+
DateTime: 64,
|
|
41
|
+
Json: 128,
|
|
42
|
+
Bytes: 256
|
|
39
43
|
};
|
|
40
44
|
function hasFlag(edge, flag) {
|
|
41
45
|
return (edge.k & flag) !== 0;
|
|
@@ -46,22 +50,24 @@ function getScalarMask(edge) {
|
|
|
46
50
|
function scalarTypeToMask(typeName) {
|
|
47
51
|
switch (typeName) {
|
|
48
52
|
case "String":
|
|
53
|
+
case "UUID":
|
|
49
54
|
return ScalarMask.String;
|
|
50
55
|
case "Int":
|
|
56
|
+
return ScalarMask.Int;
|
|
57
|
+
case "BigInt":
|
|
58
|
+
return ScalarMask.BigInt;
|
|
51
59
|
case "Float":
|
|
52
|
-
return ScalarMask.
|
|
60
|
+
return ScalarMask.Float;
|
|
61
|
+
case "Decimal":
|
|
62
|
+
return ScalarMask.Decimal;
|
|
53
63
|
case "Boolean":
|
|
54
64
|
return ScalarMask.Boolean;
|
|
55
65
|
case "DateTime":
|
|
56
66
|
return ScalarMask.DateTime;
|
|
57
|
-
case "Decimal":
|
|
58
|
-
return ScalarMask.Decimal;
|
|
59
|
-
case "BigInt":
|
|
60
|
-
return ScalarMask.BigInt;
|
|
61
|
-
case "Bytes":
|
|
62
|
-
return ScalarMask.Bytes;
|
|
63
67
|
case "Json":
|
|
64
68
|
return ScalarMask.Json;
|
|
69
|
+
case "Bytes":
|
|
70
|
+
return ScalarMask.Bytes;
|
|
65
71
|
default:
|
|
66
72
|
return 0;
|
|
67
73
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/param-graph",
|
|
3
|
-
"version": "7.3.0-integration-parameterization.
|
|
3
|
+
"version": "7.3.0-integration-parameterization.8",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|