MCPcopy Create free account
hub / github.com/documentdb/documentdb / ThrowIdPathModifiedError

Function ThrowIdPathModifiedError

pg_documentdb/src/update/bson_update.c:125–131  ·  view source on GitHub ↗

* Throws an error that the _id has been detected as changed in the process of updating the document. * Call it when UpdateType is Replace Document and _id has changed. */

Source from the content-addressed store, hash-verified

123 * Call it when UpdateType is Replace Document and _id has changed.
124 */
125inline static void
126ThrowIdPathModifiedError(void)
127{
128 ereport(ERROR, (errcode(ERRCODE_DOCUMENTDB_IMMUTABLEFIELD),
129 errmsg(
130 "Cannot modify '_id' field as part of the operation")));
131}
132
133
134/*

Callers 1

ProcessReplaceDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected