prisma 6.4.0-dev.3 → 6.4.0-dev.30

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.
@@ -373,6 +373,8 @@ declare function debugCreate(namespace: string): ((...args: any[]) => void) & {
373
373
  extend: () => void;
374
374
  };
375
375
 
376
+ export declare function Decimal(n: Decimal.Value): Decimal;
377
+
376
378
  export declare namespace Decimal {
377
379
  export type Constructor = typeof Decimal;
378
380
  export type Instance = Decimal;
@@ -1118,6 +1120,9 @@ declare interface EngineConfig {
1118
1120
  allowTriggerPanic?: boolean;
1119
1121
  prismaPath?: string;
1120
1122
  generator?: GeneratorConfig;
1123
+ /**
1124
+ * @remarks this field is used internally by Policy, do not rename or remove
1125
+ */
1121
1126
  overrideDatasources: Datasources;
1122
1127
  showColors?: boolean;
1123
1128
  logQueries?: boolean;
@@ -1146,6 +1151,7 @@ declare interface EngineConfig {
1146
1151
  /**
1147
1152
  * The contents of the datasource url saved in a string
1148
1153
  * @remarks only used by DataProxyEngine.ts
1154
+ * @remarks this field is used internally by Policy, do not rename or remove
1149
1155
  */
1150
1156
  inlineDatasources: GetPrismaClientConfig['inlineDatasources'];
1151
1157
  /**
@@ -1244,7 +1250,7 @@ declare type Error_2 = {
1244
1250
  kind: 'UnsupportedNativeDataType';
1245
1251
  type: string;
1246
1252
  } | {
1247
- kind: 'Postgres';
1253
+ kind: 'postgres';
1248
1254
  code: string;
1249
1255
  severity: string;
1250
1256
  message: string;
@@ -1252,12 +1258,12 @@ declare type Error_2 = {
1252
1258
  column: string | undefined;
1253
1259
  hint: string | undefined;
1254
1260
  } | {
1255
- kind: 'Mysql';
1261
+ kind: 'mysql';
1256
1262
  code: number;
1257
1263
  message: string;
1258
1264
  state: string;
1259
1265
  } | {
1260
- kind: 'Sqlite';
1266
+ kind: 'sqlite';
1261
1267
  /**
1262
1268
  * Sqlite extended error code: https://www.sqlite.org/rescode.html
1263
1269
  */
@@ -1432,8 +1438,6 @@ export declare interface FieldRef<Model, FieldType> {
1432
1438
  readonly isList: boolean;
1433
1439
  }
1434
1440
 
1435
- declare type Flavour = 'mysql' | 'postgres' | 'sqlite';
1436
-
1437
1441
  export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
1438
1442
 
1439
1443
  export declare interface Fn<Params = unknown, Returns = unknown> {
@@ -1534,12 +1538,14 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1534
1538
  _clientVersion: string;
1535
1539
  _errorFormat: ErrorFormat;
1536
1540
  _tracingHelper: TracingHelper;
1537
- _metrics: MetricsClient;
1538
1541
  _middlewares: MiddlewareHandler<QueryMiddleware>;
1539
1542
  _previewFeatures: string[];
1540
1543
  _activeProvider: string;
1541
1544
  _globalOmit?: GlobalOmitOptions | undefined;
1542
1545
  _extensions: MergedExtensionsList;
1546
+ /**
1547
+ * @remarks This is used internally by Policy, do not rename or remove
1548
+ */
1543
1549
  _engine: Engine;
1544
1550
  /**
1545
1551
  * A fully constructed/applied Client that references the parent
@@ -1648,7 +1654,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1648
1654
  */
1649
1655
  _request(internalParams: InternalRequestParams): Promise<any>;
1650
1656
  _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise<any>;
1651
- readonly $metrics: MetricsClient;
1657
+ $metrics: MetricsClient;
1652
1658
  /**
1653
1659
  * Shortcut for checking a preview flag
1654
1660
  * @param feature preview flag
@@ -2162,8 +2168,8 @@ export declare type Metrics = {
2162
2168
  };
2163
2169
 
2164
2170
  export declare class MetricsClient {
2165
- private _engine;
2166
- constructor(engine: Engine);
2171
+ private _client;
2172
+ constructor(client: Client);
2167
2173
  /**
2168
2174
  * Returns all metrics gathered up to this point in prometheus format.
2169
2175
  * Result of this call can be exposed directly to prometheus scraping endpoint
@@ -2536,6 +2542,8 @@ declare type PrismaPromiseTransaction<PayloadType = unknown> = PrismaPromiseBatc
2536
2542
 
2537
2543
  export declare const PrivateResultType: unique symbol;
2538
2544
 
2545
+ declare type Provider = 'mysql' | 'postgres' | 'sqlite';
2546
+
2539
2547
  declare namespace Public {
2540
2548
  export {
2541
2549
  validator
@@ -2561,7 +2569,7 @@ declare type Query = {
2561
2569
  };
2562
2570
 
2563
2571
  declare interface Queryable {
2564
- readonly provider: Flavour;
2572
+ readonly provider: Provider;
2565
2573
  readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {});
2566
2574
  /**
2567
2575
  * Execute a query given as SQL, interpolating the given parameters,
@@ -2590,7 +2598,7 @@ declare interface QueryCompilerConstructor {
2590
2598
 
2591
2599
  declare type QueryCompilerOptions = {
2592
2600
  datamodel: string;
2593
- flavour: Flavour;
2601
+ provider: Provider;
2594
2602
  connectionInfo: ConnectionInfo;
2595
2603
  };
2596
2604