July 2018
Intermediate to advanced
506 pages
16h 2m
English
Every entity in Datastore is assigned a unique identifier when created, similar to primary keys of a relational database. Identifiers are unique for the entity's namespace and kind, and may take one of two forms: a string name or a numerical ID.
Names are generally preferred when entities already contain a unique property that may be used to perform lookups. For example, a user's account entity may use the username as the entity's name. This ensures that the username is unique, and provides a very easy method for retrieving the user's account data.
If no name is specified, Datastore will automatically generate a randomly distributed numerical ID for the entity. In cases where a numerical ID needs to be known ahead of time, ...