WriteModel constructor
WriteModel({
- InsertOneModel? insertOneModel,
- DeleteOneModel? deleteOneModel,
- ReplaceOneModel? replaceOneModel,
- UpdateOneModel? updateOneModel,
- DeleteManyModel? deleteManyModel,
- UpdateManyModel? updateManyModel,
Implementation
factory WriteModel({
InsertOneModel? insertOneModel,
DeleteOneModel? deleteOneModel,
ReplaceOneModel? replaceOneModel,
UpdateOneModel? updateOneModel,
DeleteManyModel? deleteManyModel,
UpdateManyModel? updateManyModel,
}) {
final _result = create();
if (insertOneModel != null) {
_result.insertOneModel = insertOneModel;
}
if (deleteOneModel != null) {
_result.deleteOneModel = deleteOneModel;
}
if (replaceOneModel != null) {
_result.replaceOneModel = replaceOneModel;
}
if (updateOneModel != null) {
_result.updateOneModel = updateOneModel;
}
if (deleteManyModel != null) {
_result.deleteManyModel = deleteManyModel;
}
if (updateManyModel != null) {
_result.updateManyModel = updateManyModel;
}
return _result;
}