prisma-sql 1.66.0 → 1.67.0

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/index.d.mts CHANGED
@@ -65,7 +65,7 @@ declare function buildBatchSql(queries: Record<string, BatchQuery>, modelMap: Ma
65
65
  aliases: string[];
66
66
  };
67
67
  declare function buildBatchCountSql(queries: BatchCountQuery[], modelMap: Map<string, Model>, models: Model[], dialect: SqlDialect): BatchResult;
68
- declare function parseBatchCountResults(row: Record<string, unknown>, count: number): number[];
68
+ declare function parseBatchCountResults(row: Record<string, unknown>, queryCount: number): number[];
69
69
  declare function parseBatchResults(row: Record<string, unknown>, keys: string[], queries: Record<string, BatchQuery>, aliases?: string[], modelMap?: Map<string, Model>): Record<string, unknown>;
70
70
 
71
71
  interface TransactionQuery {
@@ -173,9 +173,15 @@ interface ProgressiveReducer {
173
173
  }
174
174
  declare function createProgressiveReducer(config: ReducerConfig): ProgressiveReducer;
175
175
 
176
- interface StreamingWhereInParams extends ExecuteWhereInParams {
176
+ interface StreamingWhereInParams {
177
+ segments: WhereInSegment[];
177
178
  parentSql: string;
178
179
  parentParams: unknown[];
180
+ parentModel: Model;
181
+ allModels: readonly Model[];
182
+ modelMap: Map<string, Model>;
183
+ dialect: 'postgres' | 'sqlite';
184
+ execute: (sql: string, params: unknown[]) => Promise<any[]>;
179
185
  batchSize?: number;
180
186
  maxConcurrency?: number;
181
187
  }
@@ -188,8 +194,8 @@ declare function getRowTransformer(method: string): ((row: any) => any) | null;
188
194
  declare function getOrPrepareStatement(client: any, sql: string): any;
189
195
  declare function shouldSqliteUseGet(method: string): boolean;
190
196
  declare function normalizeParams(params: unknown[]): unknown[];
191
- declare function executePostgresQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any | undefined, allModels: readonly any[]): Promise<unknown[]>;
192
- declare function executeSqliteQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any | undefined, allModels: readonly any[]): unknown[];
197
+ declare function executePostgresQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any, allModels: readonly any[]): Promise<unknown[]>;
198
+ declare function executeSqliteQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any, allModels: readonly any[]): unknown[];
193
199
  declare function executeRaw(client: any, sql: string, params: unknown[] | undefined, dialect: string): Promise<unknown[]>;
194
200
 
195
201
  declare function buildSQL(model: Model, models: Model[], method: PrismaMethod, args: Record<string, unknown>, dialect: SqlDialect): SqlResult;
package/dist/index.d.ts CHANGED
@@ -65,7 +65,7 @@ declare function buildBatchSql(queries: Record<string, BatchQuery>, modelMap: Ma
65
65
  aliases: string[];
66
66
  };
67
67
  declare function buildBatchCountSql(queries: BatchCountQuery[], modelMap: Map<string, Model>, models: Model[], dialect: SqlDialect): BatchResult;
68
- declare function parseBatchCountResults(row: Record<string, unknown>, count: number): number[];
68
+ declare function parseBatchCountResults(row: Record<string, unknown>, queryCount: number): number[];
69
69
  declare function parseBatchResults(row: Record<string, unknown>, keys: string[], queries: Record<string, BatchQuery>, aliases?: string[], modelMap?: Map<string, Model>): Record<string, unknown>;
70
70
 
71
71
  interface TransactionQuery {
@@ -173,9 +173,15 @@ interface ProgressiveReducer {
173
173
  }
174
174
  declare function createProgressiveReducer(config: ReducerConfig): ProgressiveReducer;
175
175
 
176
- interface StreamingWhereInParams extends ExecuteWhereInParams {
176
+ interface StreamingWhereInParams {
177
+ segments: WhereInSegment[];
177
178
  parentSql: string;
178
179
  parentParams: unknown[];
180
+ parentModel: Model;
181
+ allModels: readonly Model[];
182
+ modelMap: Map<string, Model>;
183
+ dialect: 'postgres' | 'sqlite';
184
+ execute: (sql: string, params: unknown[]) => Promise<any[]>;
179
185
  batchSize?: number;
180
186
  maxConcurrency?: number;
181
187
  }
@@ -188,8 +194,8 @@ declare function getRowTransformer(method: string): ((row: any) => any) | null;
188
194
  declare function getOrPrepareStatement(client: any, sql: string): any;
189
195
  declare function shouldSqliteUseGet(method: string): boolean;
190
196
  declare function normalizeParams(params: unknown[]): unknown[];
191
- declare function executePostgresQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any | undefined, allModels: readonly any[]): Promise<unknown[]>;
192
- declare function executeSqliteQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any | undefined, allModels: readonly any[]): unknown[];
197
+ declare function executePostgresQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any, allModels: readonly any[]): Promise<unknown[]>;
198
+ declare function executeSqliteQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any, allModels: readonly any[]): unknown[];
193
199
  declare function executeRaw(client: any, sql: string, params: unknown[] | undefined, dialect: string): Promise<unknown[]>;
194
200
 
195
201
  declare function buildSQL(model: Model, models: Model[], method: PrismaMethod, args: Record<string, unknown>, dialect: SqlDialect): SqlResult;