File tree Expand file tree Collapse file tree 5 files changed +10
-0
lines changed Expand file tree Collapse file tree 5 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -77,5 +77,6 @@ export const ACTIONS_WITH_WRITE_PAYLOAD = [
7777 'createManyAndReturn' ,
7878 'update' ,
7979 'updateMany' ,
80+ 'updateManyAndReturn' ,
8081 'upsert' ,
8182] ;
Original file line number Diff line number Diff line change @@ -247,6 +247,7 @@ export class NestedWriteVisitor {
247247 break ;
248248
249249 case 'updateMany' :
250+ case 'updateManyAndReturn' :
250251 for ( const item of this . enumerateReverse ( data ) ) {
251252 const newContext = pushNewContext ( field , model , item . where ) ;
252253 let callbackResult : any ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export const PrismaWriteActions = [
88 'connectOrCreate' ,
99 'update' ,
1010 'updateMany' ,
11+ 'updateManyAndReturn' ,
1112 'upsert' ,
1213 'connect' ,
1314 'disconnect' ,
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export interface PrismaProxyHandler {
3535
3636 updateMany ( args : any ) : Promise < BatchResult > ;
3737
38+ updateManyAndReturn ( args : any ) : Promise < unknown [ ] > ;
39+
3840 upsert ( args : any ) : Promise < unknown > ;
3941
4042 delete ( args : any ) : Promise < unknown > ;
@@ -132,6 +134,10 @@ export class DefaultPrismaProxyHandler implements PrismaProxyHandler {
132134 return this . deferred < { count : number } > ( 'updateMany' , args , false ) ;
133135 }
134136
137+ updateManyAndReturn ( args : any ) {
138+ return this . deferred < unknown [ ] > ( 'updateManyAndReturn' , args ) ;
139+ }
140+
135141 upsert ( args : any ) {
136142 return this . deferred ( 'upsert' , args ) ;
137143 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export interface DbOperations {
1919 createManyAndReturn ( args : unknown ) : Promise < unknown [ ] > ;
2020 update ( args : unknown ) : Promise < any > ;
2121 updateMany ( args : unknown ) : Promise < { count : number } > ;
22+ updateManyAndReturn ( args : unknown ) : Promise < unknown [ ] > ;
2223 upsert ( args : unknown ) : Promise < any > ;
2324 delete ( args : unknown ) : Promise < any > ;
2425 deleteMany ( args ?: unknown ) : Promise < { count : number } > ;
You can’t perform that action at this time.
0 commit comments