@s-hirano-ist/s-database 1.18.2 → 1.18.4

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.
@@ -7,6 +7,7 @@ import { empty } from '@prisma/client-runtime-utils';
7
7
  import { isAnyNull } from '@prisma/client-runtime-utils';
8
8
  import { isDbNull } from '@prisma/client-runtime-utils';
9
9
  import { isJsonNull } from '@prisma/client-runtime-utils';
10
+ import { isObjectEnumValue } from '@prisma/client-runtime-utils';
10
11
  import { join } from '@prisma/client-runtime-utils';
11
12
  import { JsonNull } from '@prisma/client-runtime-utils';
12
13
  import { JsonNullClass } from '@prisma/client-runtime-utils';
@@ -461,7 +462,7 @@ export declare function defineDmmfProperty(target: object, runtimeDataModel: Run
461
462
 
462
463
  declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client;
463
464
 
464
- declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$extends"];
465
+ declare const denylist: readonly ["$connect", "$disconnect", "$on", "$use", "$extends"];
465
466
 
466
467
  declare type Deprecation = ReadonlyDeep_2<{
467
468
  sinceVersion: string;
@@ -1089,6 +1090,9 @@ declare type Fragment = {
1089
1090
  type: 'parameter';
1090
1091
  } | {
1091
1092
  type: 'parameterTuple';
1093
+ itemPrefix: string;
1094
+ itemSeparator: string;
1095
+ itemSuffix: string;
1092
1096
  } | {
1093
1097
  type: 'parameterTupleList';
1094
1098
  itemPrefix: string;
@@ -1260,7 +1264,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1260
1264
  callback: (client: Client) => Promise<unknown>;
1261
1265
  options?: Options;
1262
1266
  }): Promise<unknown>;
1263
- _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client;
1267
+ _createItxClient(transaction: PrismaPromiseInteractiveTransaction, scopeId: string, scopeState: ItxScopeState): Client;
1264
1268
  /**
1265
1269
  * Execute queries within a transaction
1266
1270
  * @param input a callback or a query list
@@ -1540,6 +1544,8 @@ export { isDbNull }
1540
1544
 
1541
1545
  export { isJsonNull }
1542
1546
 
1547
+ export { isObjectEnumValue }
1548
+
1543
1549
  declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
1544
1550
 
1545
1551
  declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable';
@@ -1552,6 +1558,10 @@ export declare type ITXClientDenyList = (typeof denylist)[number];
1552
1558
 
1553
1559
  export declare const itxClientDenyList: readonly (string | symbol)[];
1554
1560
 
1561
+ declare type ItxScopeState = {
1562
+ stack: string[];
1563
+ };
1564
+
1555
1565
  declare interface Job {
1556
1566
  resolve: (data: any) => void;
1557
1567
  reject: (data: any) => void;
@@ -1910,6 +1920,11 @@ declare type Options = {
1910
1920
  timeout?: number;
1911
1921
  /** Transaction isolation level */
1912
1922
  isolationLevel?: IsolationLevel_2;
1923
+ /**
1924
+ * Used for nested interactive transactions. When provided, the engine may
1925
+ * re-use an existing open transaction instead of opening a new one.
1926
+ */
1927
+ newTxId?: string;
1913
1928
  };
1914
1929
 
1915
1930
  export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
@@ -2324,6 +2339,7 @@ declare type QueryPlanNode = {
2324
2339
  args: {
2325
2340
  parent: QueryPlanNode;
2326
2341
  children: JoinExpression[];
2342
+ canAssumeStrictEquality: boolean;
2327
2343
  };
2328
2344
  } | {
2329
2345
  type: 'mapField';
@@ -3147,6 +3163,18 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
3147
3163
  * Roll back the transaction.
3148
3164
  */
3149
3165
  rollback(): Promise<void>;
3166
+ /**
3167
+ * Creates a savepoint within the currently running transaction.
3168
+ */
3169
+ createSavepoint?(name: string): Promise<void>;
3170
+ /**
3171
+ * Rolls back transaction state to a previously created savepoint.
3172
+ */
3173
+ rollbackToSavepoint?(name: string): Promise<void>;
3174
+ /**
3175
+ * Releases a previously created savepoint. Optional because not every connector supports this operation.
3176
+ */
3177
+ releaseSavepoint?(name: string): Promise<void>;
3150
3178
  }
3151
3179
 
3152
3180
  declare namespace Transaction_2 {
@@ -3276,14 +3304,14 @@ declare namespace Utils {
3276
3304
  }
3277
3305
 
3278
3306
  declare type ValidationError = {
3279
- error_identifier: 'RELATION_VIOLATION';
3307
+ errorIdentifier: 'RELATION_VIOLATION';
3280
3308
  context: {
3281
3309
  relation: string;
3282
3310
  modelA: string;
3283
3311
  modelB: string;
3284
3312
  };
3285
3313
  } | {
3286
- error_identifier: 'MISSING_RELATED_RECORD';
3314
+ errorIdentifier: 'MISSING_RELATED_RECORD';
3287
3315
  context: {
3288
3316
  model: string;
3289
3317
  relation: string;
@@ -3292,24 +3320,24 @@ declare type ValidationError = {
3292
3320
  neededFor?: string;
3293
3321
  };
3294
3322
  } | {
3295
- error_identifier: 'MISSING_RECORD';
3323
+ errorIdentifier: 'MISSING_RECORD';
3296
3324
  context: {
3297
3325
  operation: string;
3298
3326
  };
3299
3327
  } | {
3300
- error_identifier: 'INCOMPLETE_CONNECT_INPUT';
3328
+ errorIdentifier: 'INCOMPLETE_CONNECT_INPUT';
3301
3329
  context: {
3302
3330
  expectedRows: number;
3303
3331
  };
3304
3332
  } | {
3305
- error_identifier: 'INCOMPLETE_CONNECT_OUTPUT';
3333
+ errorIdentifier: 'INCOMPLETE_CONNECT_OUTPUT';
3306
3334
  context: {
3307
3335
  expectedRows: number;
3308
3336
  relation: string;
3309
3337
  relationType: string;
3310
3338
  };
3311
3339
  } | {
3312
- error_identifier: 'RECORDS_NOT_CONNECTED';
3340
+ errorIdentifier: 'RECORDS_NOT_CONNECTED';
3313
3341
  context: {
3314
3342
  relation: string;
3315
3343
  parent: string;