@prisma/client-engine-runtime 6.6.0-dev.8 → 6.6.0-dev.80

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.
@@ -6,15 +6,41 @@ export type PrismaValuePlaceholder = {
6
6
  };
7
7
  };
8
8
  export declare function isPrismaValuePlaceholder(value: unknown): value is PrismaValuePlaceholder;
9
- export type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder;
9
+ export type PrismaValueGenerator = {
10
+ prisma__type: 'generatorCall';
11
+ prisma__value: {
12
+ name: string;
13
+ args: PrismaValue[];
14
+ };
15
+ };
16
+ export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
17
+ export type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator;
10
18
  export type QueryPlanBinding = {
11
19
  name: string;
12
20
  expr: QueryPlanNode;
13
21
  };
14
22
  export type QueryPlanDbQuery = {
15
- query: string;
23
+ type: 'rawSql';
24
+ sql: string;
16
25
  params: PrismaValue[];
26
+ } | {
27
+ type: 'templateSql';
28
+ fragments: Fragment[];
29
+ placeholderFormat: PlaceholderFormat;
30
+ params: PrismaValue[];
31
+ };
32
+ export type Fragment = {
33
+ type: 'stringChunk';
34
+ value: string;
35
+ } | {
36
+ type: 'parameter';
37
+ } | {
38
+ type: 'parameterTuple';
17
39
  };
40
+ export interface PlaceholderFormat {
41
+ prefix: string;
42
+ hasNumbering: boolean;
43
+ }
18
44
  export type JoinExpression = {
19
45
  child: QueryPlanNode;
20
46
  on: [left: string, right: string][];
@@ -0,0 +1 @@
1
+ export declare function randomUUID(): Promise<string>;
package/dist/index.d.mts CHANGED
@@ -1,14 +1,18 @@
1
- import { ErrorCapturingSqlConnection } from '@prisma/driver-adapter-utils';
2
- import { ErrorCapturingSqlQueryable } from '@prisma/driver-adapter-utils';
3
- import { ErrorCapturingTransaction } from '@prisma/driver-adapter-utils';
4
-
5
- export declare const enum IsolationLevel {
6
- ReadUncommitted = "ReadUncommitted",
7
- ReadCommitted = "ReadCommitted",
8
- RepeatableRead = "RepeatableRead",
9
- Snapshot = "Snapshot",
10
- Serializable = "Serializable"
11
- }
1
+ import type { IsolationLevel } from '@prisma/driver-adapter-utils';
2
+ import { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
3
+ import { SqlQueryable } from '@prisma/driver-adapter-utils';
4
+ import { Transaction } from '@prisma/driver-adapter-utils';
5
+
6
+ export declare type Fragment = {
7
+ type: 'stringChunk';
8
+ value: string;
9
+ } | {
10
+ type: 'parameter';
11
+ } | {
12
+ type: 'parameterTuple';
13
+ };
14
+
15
+ export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
12
16
 
13
17
  export declare function isPrismaValuePlaceholder(value: unknown): value is PrismaValuePlaceholder;
14
18
 
@@ -18,7 +22,20 @@ export declare type JoinExpression = {
18
22
  parentField: string;
19
23
  };
20
24
 
21
- export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder;
25
+ export declare interface PlaceholderFormat {
26
+ prefix: string;
27
+ hasNumbering: boolean;
28
+ }
29
+
30
+ export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator;
31
+
32
+ export declare type PrismaValueGenerator = {
33
+ prisma__type: 'generatorCall';
34
+ prisma__value: {
35
+ name: string;
36
+ args: PrismaValue[];
37
+ };
38
+ };
22
39
 
23
40
  export declare type PrismaValuePlaceholder = {
24
41
  prisma__type: 'param';
@@ -43,7 +60,7 @@ export declare class QueryInterpreter {
43
60
  }
44
61
 
45
62
  export declare type QueryInterpreterOptions = {
46
- queryable: ErrorCapturingSqlQueryable;
63
+ queryable: SqlQueryable;
47
64
  placeholderValues: Record<string, unknown>;
48
65
  onQuery?: (event: QueryEvent) => void;
49
66
  };
@@ -54,7 +71,13 @@ export declare type QueryPlanBinding = {
54
71
  };
55
72
 
56
73
  export declare type QueryPlanDbQuery = {
57
- query: string;
74
+ type: 'rawSql';
75
+ sql: string;
76
+ params: PrismaValue[];
77
+ } | {
78
+ type: 'templateSql';
79
+ fragments: Fragment[];
80
+ placeholderFormat: PlaceholderFormat;
58
81
  params: PrismaValue[];
59
82
  };
60
83
 
@@ -121,18 +144,17 @@ export declare class TransactionManager {
121
144
  private closedTransactions;
122
145
  private readonly driverAdapter;
123
146
  constructor({ driverAdapter }: {
124
- driverAdapter: ErrorCapturingSqlConnection;
147
+ driverAdapter: SqlDriverAdapter;
125
148
  });
126
149
  startTransaction(options: TransactionOptions): Promise<TransactionInfo>;
127
150
  commitTransaction(transactionId: string): Promise<void>;
128
151
  rollbackTransaction(transactionId: string): Promise<void>;
129
- getTransaction(txInfo: TransactionInfo, operation: string): ErrorCapturingTransaction;
152
+ getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
130
153
  private getActiveTransaction;
131
154
  cancelAllTransactions(): Promise<void>;
132
155
  private startTransactionTimeout;
133
156
  private closeTransaction;
134
157
  private validateOptions;
135
- private requiresSettingIsolationLevelFirst;
136
158
  }
137
159
 
138
160
  export declare class TransactionManagerError extends Error {
package/dist/index.d.ts CHANGED
@@ -1,14 +1,18 @@
1
- import { ErrorCapturingSqlConnection } from '@prisma/driver-adapter-utils';
2
- import { ErrorCapturingSqlQueryable } from '@prisma/driver-adapter-utils';
3
- import { ErrorCapturingTransaction } from '@prisma/driver-adapter-utils';
4
-
5
- export declare const enum IsolationLevel {
6
- ReadUncommitted = "ReadUncommitted",
7
- ReadCommitted = "ReadCommitted",
8
- RepeatableRead = "RepeatableRead",
9
- Snapshot = "Snapshot",
10
- Serializable = "Serializable"
11
- }
1
+ import type { IsolationLevel } from '@prisma/driver-adapter-utils';
2
+ import { SqlDriverAdapter } from '@prisma/driver-adapter-utils';
3
+ import { SqlQueryable } from '@prisma/driver-adapter-utils';
4
+ import { Transaction } from '@prisma/driver-adapter-utils';
5
+
6
+ export declare type Fragment = {
7
+ type: 'stringChunk';
8
+ value: string;
9
+ } | {
10
+ type: 'parameter';
11
+ } | {
12
+ type: 'parameterTuple';
13
+ };
14
+
15
+ export declare function isPrismaValueGenerator(value: unknown): value is PrismaValueGenerator;
12
16
 
13
17
  export declare function isPrismaValuePlaceholder(value: unknown): value is PrismaValuePlaceholder;
14
18
 
@@ -18,7 +22,20 @@ export declare type JoinExpression = {
18
22
  parentField: string;
19
23
  };
20
24
 
21
- export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder;
25
+ export declare interface PlaceholderFormat {
26
+ prefix: string;
27
+ hasNumbering: boolean;
28
+ }
29
+
30
+ export declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record<string, unknown> | PrismaValuePlaceholder | PrismaValueGenerator;
31
+
32
+ export declare type PrismaValueGenerator = {
33
+ prisma__type: 'generatorCall';
34
+ prisma__value: {
35
+ name: string;
36
+ args: PrismaValue[];
37
+ };
38
+ };
22
39
 
23
40
  export declare type PrismaValuePlaceholder = {
24
41
  prisma__type: 'param';
@@ -43,7 +60,7 @@ export declare class QueryInterpreter {
43
60
  }
44
61
 
45
62
  export declare type QueryInterpreterOptions = {
46
- queryable: ErrorCapturingSqlQueryable;
63
+ queryable: SqlQueryable;
47
64
  placeholderValues: Record<string, unknown>;
48
65
  onQuery?: (event: QueryEvent) => void;
49
66
  };
@@ -54,7 +71,13 @@ export declare type QueryPlanBinding = {
54
71
  };
55
72
 
56
73
  export declare type QueryPlanDbQuery = {
57
- query: string;
74
+ type: 'rawSql';
75
+ sql: string;
76
+ params: PrismaValue[];
77
+ } | {
78
+ type: 'templateSql';
79
+ fragments: Fragment[];
80
+ placeholderFormat: PlaceholderFormat;
58
81
  params: PrismaValue[];
59
82
  };
60
83
 
@@ -121,18 +144,17 @@ export declare class TransactionManager {
121
144
  private closedTransactions;
122
145
  private readonly driverAdapter;
123
146
  constructor({ driverAdapter }: {
124
- driverAdapter: ErrorCapturingSqlConnection;
147
+ driverAdapter: SqlDriverAdapter;
125
148
  });
126
149
  startTransaction(options: TransactionOptions): Promise<TransactionInfo>;
127
150
  commitTransaction(transactionId: string): Promise<void>;
128
151
  rollbackTransaction(transactionId: string): Promise<void>;
129
- getTransaction(txInfo: TransactionInfo, operation: string): ErrorCapturingTransaction;
152
+ getTransaction(txInfo: TransactionInfo, operation: string): Transaction;
130
153
  private getActiveTransaction;
131
154
  cancelAllTransactions(): Promise<void>;
132
155
  private startTransactionTimeout;
133
156
  private closeTransaction;
134
157
  private validateOptions;
135
- private requiresSettingIsolationLevelFirst;
136
158
  }
137
159
 
138
160
  export declare class TransactionManagerError extends Error {