MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / ExtUpdateOperatorInc

Class ExtUpdateOperatorInc

src/ExtOperator.actor.cpp:394–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394struct 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};
406REGISTER_UPDATE_OPERATOR(ExtUpdateOperatorInc, "$inc");
407
408ACTOR static Future<Void> getValueAndMultiply(Reference<IReadWriteContext> cx,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected