| 392 | } |
| 393 | |
| 394 | struct ExtUpdateOperatorInc { |
| 395 | static const char* name; |
| 396 | static Future<Void> execute(Reference<IReadWriteContext> cx, |
| 397 | StringRef const& path, |
| 398 | bson::BSONElement const& element) { |
| 399 | DataValue valueToAdd(element); |
| 400 | if (valueToAdd.getSortType() != DVTypeCode::NUMBER) |
| 401 | throw inc_or_mul_with_non_number(); |
| 402 | |
| 403 | return getValueAndAdd(cx, path, valueToAdd); |
| 404 | } |
| 405 | }; |
| 406 | REGISTER_UPDATE_OPERATOR(ExtUpdateOperatorInc, "$inc"); |
| 407 | |
| 408 | ACTOR static Future<Void> getValueAndMultiply(Reference<IReadWriteContext> cx, |
nothing calls this directly
no outgoing calls
no test coverage detected