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

Method replace

test/correctness/mongo_model.py:603–608  ·  view source on GitHub ↗
(self, key, new_value)

Source from the content-addressed store, hash-verified

601 raise MongoModelException("Bad filed path: " + field)
602
603 def replace(self, key, new_value):
604 if "_id" in new_value:
605 raise MongoModelException("The _id field cannot be changed", code=16836)
606 _id = self.data[key]['_id']
607 self.data[key] = deepcopy(new_value)
608 self.data[key]['_id'] = _id
609
610 def drop(self):
611 self.drop_indexes()

Callers 1

Calls 1

MongoModelExceptionClass · 0.85

Tested by

no test coverage detected