Reference documentation and code samples for the Cloud Datastore Client class EntityMapper.
Utility methods for mapping between datastore and Google\Cloud\Datastore\Entity .
Namespace
Google \ Cloud \ DatastoreMethods
__construct
Create an Entity Mapper
projectId
string
The datastore project ID
encode
bool
Whether to encode blobs as base64.
returnInt64AsObject
bool
If true, 64 bit integers will be returned as a Google\Cloud\Core\Int64 object for 32 bit platform compatibility.
connectionType
string
[optional] The connection type of the client.
Can be rest
or grpc
, defaults to grpc
.
responseToEntityProperties
Convert an entity response to properties, excludes and meanings.
entityData
array
The incoming entity
className
string
The name of a class to use as the entity. Must implement Google\Cloud\Datastore\EntityInterface .
array
objectToRequest
Translate an Entity to a datastore representation.
entity
Google\Cloud\Datastore\EntityInterface
The input entity.
array
convertValue
Convert a Datastore value object to a simple value
type
string
The value type
value
mixed
The value
className
string
[optional] The object type to decode to, if type is entityValue.
mixed
valueObject
Format values for the API
value
mixed
exclude
bool
[optional] If true, value will be excluded from datastore indexes.
meaning
int
[optional] The Meaning value. Maintained only for backwards compatibility.
array
objectProperty
Convert different object types to API values
value
mixed
The value object
array
Constants
DATE_FORMAT
Value: 'Y-m-d\\TH:i:s.uP'
DATE_FORMAT_NO_MS
Value: 'Y-m-d\\TH:i:sP'