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/generator.cjs +7511 -8015
- package/dist/generator.cjs.map +1 -1
- package/dist/generator.js +7511 -8015
- package/dist/generator.js.map +1 -1
- package/dist/index.cjs +804 -1327
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +10 -4
- package/dist/index.d.ts +10 -4
- package/dist/index.js +804 -1327
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
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>,
|
|
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
|
|
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
|
|
192
|
-
declare function executeSqliteQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any
|
|
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>,
|
|
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
|
|
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
|
|
192
|
-
declare function executeSqliteQuery(client: any, sql: string, params: unknown[], method: string, requiresReduction: boolean, includeSpec: Record<string, any> | undefined, model: any
|
|
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;
|