Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement updateManyAndReturn #5098

Merged
merged 12 commits into from
Jan 2, 2025
141 changes: 141 additions & 0 deletions prisma-fmt/src/get_dmmf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5533,6 +5533,50 @@ mod tests {
"isList": false
}
},
{
"name": "updateManyAAndReturn",
"args": [
{
"name": "data",
"isRequired": true,
"isNullable": false,
"inputTypes": [
{
"type": "AUpdateManyMutationInput",
"namespace": "prisma",
"location": "inputObjectTypes",
"isList": false
},
{
"type": "AUncheckedUpdateManyInput",
"namespace": "prisma",
"location": "inputObjectTypes",
"isList": false
}
]
},
{
"name": "where",
"isRequired": false,
"isNullable": false,
"inputTypes": [
{
"type": "AWhereInput",
"namespace": "prisma",
"location": "inputObjectTypes",
"isList": false
}
]
}
],
"isNullable": false,
"outputType": {
"type": "UpdateManyAAndReturnOutputType",
"namespace": "model",
"location": "outputObjectTypes",
"isList": true
}
},
{
"name": "deleteManyA",
"args": [
Expand Down Expand Up @@ -5851,6 +5895,50 @@ mod tests {
"isList": false
}
},
{
"name": "updateManyBAndReturn",
"args": [
{
"name": "data",
"isRequired": true,
"isNullable": false,
"inputTypes": [
{
"type": "BUpdateManyMutationInput",
"namespace": "prisma",
"location": "inputObjectTypes",
"isList": false
},
{
"type": "BUncheckedUpdateManyInput",
"namespace": "prisma",
"location": "inputObjectTypes",
"isList": false
}
]
},
{
"name": "where",
"isRequired": false,
"isNullable": false,
"inputTypes": [
{
"type": "BWhereInput",
"namespace": "prisma",
"location": "inputObjectTypes",
"isList": false
}
]
}
],
"isNullable": false,
"outputType": {
"type": "UpdateManyBAndReturnOutputType",
"namespace": "model",
"location": "outputObjectTypes",
"isList": true
}
},
{
"name": "deleteManyB",
"args": [
Expand Down Expand Up @@ -6399,6 +6487,42 @@ mod tests {
}
]
},
{
"name": "UpdateManyAAndReturnOutputType",
"fields": [
{
"name": "id",
"args": [],
"isNullable": false,
"outputType": {
"type": "String",
"location": "scalar",
"isList": false
}
},
{
"name": "b_id",
"args": [],
"isNullable": false,
"outputType": {
"type": "String",
"location": "scalar",
"isList": false
}
},
{
"name": "b",
"args": [],
"isNullable": false,
"outputType": {
"type": "B",
"namespace": "model",
"location": "outputObjectTypes",
"isList": false
}
}
]
},
{
"name": "CreateManyBAndReturnOutputType",
"fields": [
Expand All @@ -6413,6 +6537,21 @@ mod tests {
}
}
]
},
{
"name": "UpdateManyBAndReturnOutputType",
"fields": [
{
"name": "id",
"args": [],
"isNullable": false,
"outputType": {
"type": "String",
"location": "scalar",
"isList": false
}
}
]
}
]
},
Expand Down Expand Up @@ -6622,6 +6761,7 @@ mod tests {
"findUniqueOrThrow": "findUniqueAOrThrow",
"groupBy": "groupByA",
"updateMany": "updateManyA",
"updateManyAndReturn": "updateManyAAndReturn",
"updateOne": "updateOneA",
"upsertOne": "upsertOneA"
},
Expand All @@ -6640,6 +6780,7 @@ mod tests {
"findUniqueOrThrow": "findUniqueBOrThrow",
"groupBy": "groupByB",
"updateMany": "updateManyB",
"updateManyAndReturn": "updateManyBAndReturn",
"updateOne": "updateOneB",
"upsertOne": "upsertOneB"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ mod insert_null_in_required_field;
mod non_embedded_upsert;
mod update;
mod update_many;
mod update_many_and_return;
mod upsert;
Loading
Loading