prisma 6.5.0-integration-fix-e2e-prisma-config-2.8 → 6.5.0-integration-fix-client-read-replicas.1

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.
@@ -25,6 +25,15 @@ export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'que
25
25
 
26
26
  declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres' | 'prisma+postgres'>;
27
27
 
28
+ /**
29
+ * An interface that exposes some basic information about the
30
+ * adapter like its name and provider type.
31
+ */
32
+ declare interface AdapterInfo {
33
+ readonly provider: Provider;
34
+ readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {});
35
+ }
36
+
28
37
  export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum';
29
38
 
30
39
  export declare type AllModelsToStringIndex<TypeMap extends TypeMapDef, Args extends Record<string, any>, K extends PropertyKey> = Args extends {
@@ -937,15 +946,23 @@ export declare namespace DMMF {
937
946
 
938
947
  export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel;
939
948
 
940
- export declare interface DriverAdapter extends Queryable {
949
+ export declare interface DriverAdapter extends SqlQueryable {
950
+ /**
951
+ * Execute multiple SQL statements separated by semicolon.
952
+ */
953
+ executeScript(script: string): Promise<void>;
941
954
  /**
942
- * Starts new transaction.
955
+ * Start new transaction.
943
956
  */
944
- transactionContext(): Promise<Result_4<TransactionContext>>;
957
+ transactionContext(): Promise<TransactionContext>;
945
958
  /**
946
959
  * Optional method that returns extra connection info
947
960
  */
948
- getConnectionInfo?(): Result_4<ConnectionInfo>;
961
+ getConnectionInfo?(): ConnectionInfo;
962
+ /**
963
+ * Dispose of the connection and release any resources.
964
+ */
965
+ dispose(): Promise<void>;
949
966
  }
950
967
 
951
968
  /** Client */
@@ -1142,7 +1159,7 @@ declare interface EngineConfig {
1142
1159
  * rather than Prisma's Rust drivers.
1143
1160
  * @remarks only used by LibraryEngine.ts
1144
1161
  */
1145
- adapter?: ErrorCapturingDriverAdapter;
1162
+ adapter?: ErrorCapturingSqlConnection;
1146
1163
  /**
1147
1164
  * The contents of the schema encoded into a string
1148
1165
  * @remarks only used by DataProxyEngine.ts
@@ -1271,7 +1288,13 @@ declare type Error_2 = {
1271
1288
  message: string;
1272
1289
  };
1273
1290
 
1274
- declare interface ErrorCapturingDriverAdapter extends DriverAdapter {
1291
+ declare type ErrorCapturingFunction<T> = T extends (...args: infer A) => Promise<infer R> ? (...args: A) => Promise<Result_4<ErrorCapturingInterface<R>>> : T extends (...args: infer A) => infer R ? (...args: A) => Result_4<ErrorCapturingInterface<R>> : T;
1292
+
1293
+ declare type ErrorCapturingInterface<T> = {
1294
+ [K in keyof T]: ErrorCapturingFunction<T[K]>;
1295
+ };
1296
+
1297
+ declare interface ErrorCapturingSqlConnection extends ErrorCapturingInterface<DriverAdapter> {
1275
1298
  readonly errorRegistry: ErrorRegistry;
1276
1299
  }
1277
1300
 
@@ -2556,30 +2579,15 @@ declare namespace Public_2 {
2556
2579
  }
2557
2580
  }
2558
2581
 
2559
- declare type Query = {
2560
- sql: string;
2561
- args: Array<unknown>;
2562
- argTypes: Array<ArgType>;
2563
- };
2564
-
2565
- declare interface Queryable {
2566
- readonly provider: Provider;
2567
- readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {});
2582
+ declare interface Queryable<Query, Result> extends AdapterInfo {
2568
2583
  /**
2569
- * Execute a query given as SQL, interpolating the given parameters,
2570
- * and returning the type-aware result set of the query.
2571
- *
2572
- * This is the preferred way of executing `SELECT` queries.
2584
+ * Execute a query and return its result.
2573
2585
  */
2574
- queryRaw(params: Query): Promise<Result_4<ResultSet>>;
2586
+ queryRaw(params: Query): Promise<Result>;
2575
2587
  /**
2576
- * Execute a query given as SQL, interpolating the given parameters,
2577
- * and returning the number of affected rows.
2578
- *
2579
- * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries,
2580
- * as well as transactional queries.
2588
+ * Execute a query and return the number of affected rows.
2581
2589
  */
2582
- executeRaw(params: Query): Promise<Result_4<number>>;
2590
+ executeRaw(params: Query): Promise<number>;
2583
2591
  }
2584
2592
 
2585
2593
  declare type QueryCompiler = {
@@ -2617,7 +2625,7 @@ declare type QueryEngineConfig = {
2617
2625
  };
2618
2626
 
2619
2627
  declare interface QueryEngineConstructor {
2620
- new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance;
2628
+ new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlConnection): QueryEngineInstance;
2621
2629
  }
2622
2630
 
2623
2631
  declare type QueryEngineInstance = {
@@ -2881,28 +2889,6 @@ export declare type ResultFieldDefinition = {
2881
2889
  compute: ResultArgsFieldCompute;
2882
2890
  };
2883
2891
 
2884
- declare interface ResultSet {
2885
- /**
2886
- * List of column types appearing in a database query, in the same order as `columnNames`.
2887
- * They are used within the Query Engine to convert values from JS to Quaint values.
2888
- */
2889
- columnTypes: Array<ColumnType>;
2890
- /**
2891
- * List of column names appearing in a database query, in the same order as `columnTypes`.
2892
- */
2893
- columnNames: Array<string>;
2894
- /**
2895
- * List of rows retrieved from a database query.
2896
- * Each row is a list of values, whose length matches `columnNames` and `columnTypes`.
2897
- */
2898
- rows: Array<Array<unknown>>;
2899
- /**
2900
- * The last ID of an `INSERT` statement, if any.
2901
- * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite.
2902
- */
2903
- lastInsertId?: string;
2904
- }
2905
-
2906
2892
  export declare type Return<T> = T extends (...args: any[]) => infer R ? R : T;
2907
2893
 
2908
2894
  declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown";
@@ -3229,6 +3215,37 @@ export declare class Sql {
3229
3215
  };
3230
3216
  }
3231
3217
 
3218
+ declare type SqlQuery = {
3219
+ sql: string;
3220
+ args: Array<unknown>;
3221
+ argTypes: Array<ArgType>;
3222
+ };
3223
+
3224
+ declare interface SqlQueryable extends Queryable<SqlQuery, SqlResultSet> {
3225
+ }
3226
+
3227
+ declare interface SqlResultSet {
3228
+ /**
3229
+ * List of column types appearing in a database query, in the same order as `columnNames`.
3230
+ * They are used within the Query Engine to convert values from JS to Quaint values.
3231
+ */
3232
+ columnTypes: Array<ColumnType>;
3233
+ /**
3234
+ * List of column names appearing in a database query, in the same order as `columnTypes`.
3235
+ */
3236
+ columnNames: Array<string>;
3237
+ /**
3238
+ * List of rows retrieved from a database query.
3239
+ * Each row is a list of values, whose length matches `columnNames` and `columnTypes`.
3240
+ */
3241
+ rows: Array<Array<unknown>>;
3242
+ /**
3243
+ * The last ID of an `INSERT` statement, if any.
3244
+ * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite.
3245
+ */
3246
+ lastInsertId?: string;
3247
+ }
3248
+
3232
3249
  /**
3233
3250
  * Create a SQL object from a template string.
3234
3251
  */
@@ -3289,7 +3306,7 @@ declare interface TracingHelper {
3289
3306
  runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
3290
3307
  }
3291
3308
 
3292
- declare interface Transaction extends Queryable {
3309
+ declare interface Transaction extends AdapterInfo, SqlQueryable {
3293
3310
  /**
3294
3311
  * Transaction options.
3295
3312
  */
@@ -3297,11 +3314,11 @@ declare interface Transaction extends Queryable {
3297
3314
  /**
3298
3315
  * Commit the transaction.
3299
3316
  */
3300
- commit(): Promise<Result_4<void>>;
3317
+ commit(): Promise<void>;
3301
3318
  /**
3302
- * Rolls back the transaction.
3319
+ * Roll back the transaction.
3303
3320
  */
3304
- rollback(): Promise<Result_4<void>>;
3321
+ rollback(): Promise<void>;
3305
3322
  }
3306
3323
 
3307
3324
  declare namespace Transaction_2 {
@@ -3313,11 +3330,11 @@ declare namespace Transaction_2 {
3313
3330
  }
3314
3331
  }
3315
3332
 
3316
- declare interface TransactionContext extends Queryable {
3333
+ declare interface TransactionContext extends AdapterInfo, SqlQueryable {
3317
3334
  /**
3318
- * Starts new transaction.
3335
+ * Start new transaction.
3319
3336
  */
3320
- startTransaction(): Promise<Result_4<Transaction>>;
3337
+ startTransaction(): Promise<Transaction>;
3321
3338
  }
3322
3339
 
3323
3340
  declare type TransactionHeaders = {