Indicates that entities with keys inside the given KeyRange already exist and writing
to this range will overwrite those entities. Additionally the implications of #CONTENTION apply. If overwriting entities that exist in this range is acceptable it is safe
to use the given range.
The datastore's automatic ID allocator will never assign a key to a new entity that will
overwrite an existing entity so entities written by the user to this range will never be
overwritten by an entity with an automatically assigned key.
CONTENTION
Indicates the given KeyRange is empty but the datastore's automatic ID allocator may
assign new entities keys in this range. However it is safe to manually assign Keys in this range if either of the following is true:
No other request will insert entities with the same kind and parent as the given KeyRange until all entities with manually assigned keys from this range have been
written.
Overwriting entities written by other requests with the same kind and parent as the
given KeyRange is acceptable.
The datastore's automatic ID allocator will not assign a key to a new entity that will
overwrite an existing entity, so once the range is populated there will no longer be any
contention.
EMPTY
Indicates the given KeyRange is empty and the datastore's automatic ID allocator will
not assign keys in this range to new entities.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eDatastoreService.KeyRangeState\u003c/code\u003e is an enum that signifies the status of a \u003ccode\u003eKeyRange\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCOLLISION\u003c/code\u003e state means entities within the \u003ccode\u003eKeyRange\u003c/code\u003e already exist, and overwriting them is possible if acceptable.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCONTENTION\u003c/code\u003e state indicates the \u003ccode\u003eKeyRange\u003c/code\u003e is currently empty, but new entities could be assigned keys within this range.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eEMPTY\u003c/code\u003e state signifies that the \u003ccode\u003eKeyRange\u003c/code\u003e has no entities and the datastore will not assign keys in this range to new entities.\u003c/p\u003e\n"],["\u003cp\u003eThere are static methods \u003ccode\u003evalueOf(String name)\u003c/code\u003e and \u003ccode\u003evalues()\u003c/code\u003e, and the enum inherits multiple methods from the \u003ccode\u003eEnum\u003c/code\u003e and \u003ccode\u003eObject\u003c/code\u003e class.\u003c/p\u003e\n"]]],[],null,[]]