Reference documentation and code samples for the Cloud Datastore V1 Client class Value.
A message that can hold any of the supported value types and associated metadata.
Generated from protobuf message google.datastore.v1.Value
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ null_value
int
A null value.
↳ boolean_value
bool
A boolean value.
↳ integer_value
int|string
An integer value.
↳ double_value
float
A double value.
↳ timestamp_value
Google\Protobuf\Timestamp
A timestamp value. When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.
↳ key_value
↳ string_value
string
A UTF-8 encoded string value. When exclude_from_indexes
is false (it is indexed) , may have at most 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
↳ blob_value
string
A blob value. May have at most 1,000,000 bytes. When exclude_from_indexes
is false, may have at most 1500 bytes. In JSON requests, must be base64-encoded.
↳ geo_point_value
↳ entity_value
Google\Cloud\Datastore\V1\Entity
An entity value. - May have no key. - May have a key with an incomplete key path. - May have a reserved/read-only key.
↳ array_value
Google\Cloud\Datastore\V1\ArrayValue
An array value. Cannot contain another array value. A Value
instance that sets field array_value
must not set fields meaning
or exclude_from_indexes
.
↳ meaning
int
The meaning
field should only be populated for backwards compatibility.
↳ exclude_from_indexes
bool
If the value should be excluded from all indexes including those defined explicitly.
getNullValue
A null value.
int
hasNullValue
setNullValue
A null value.
var
int
$this
getBooleanValue
A boolean value.
bool
hasBooleanValue
setBooleanValue
A boolean value.
var
bool
$this
getIntegerValue
An integer value.
int|string
hasIntegerValue
setIntegerValue
An integer value.
var
int|string
$this
getDoubleValue
A double value.
float
hasDoubleValue
setDoubleValue
A double value.
var
float
$this
getTimestampValue
A timestamp value.
When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.
hasTimestampValue
setTimestampValue
A timestamp value.
When stored in the Datastore, precise only to microseconds; any additional precision is rounded down.
$this
getKeyValue
A key value.
hasKeyValue
setKeyValue
A key value.
$this
getStringValue
A UTF-8 encoded string value.
When exclude_from_indexes
is false (it is indexed) , may have at most 1500 bytes.
Otherwise, may be set to at most 1,000,000 bytes.
string
hasStringValue
setStringValue
A UTF-8 encoded string value.
When exclude_from_indexes
is false (it is indexed) , may have at most 1500 bytes.
Otherwise, may be set to at most 1,000,000 bytes.
var
string
$this
getBlobValue
A blob value.
May have at most 1,000,000 bytes.
When exclude_from_indexes
is false, may have at most 1500 bytes.
In JSON requests, must be base64-encoded.
string
hasBlobValue
setBlobValue
A blob value.
May have at most 1,000,000 bytes.
When exclude_from_indexes
is false, may have at most 1500 bytes.
In JSON requests, must be base64-encoded.
var
string
$this
getGeoPointValue
A geo point value representing a point on the surface of Earth.
hasGeoPointValue
setGeoPointValue
A geo point value representing a point on the surface of Earth.
$this
getEntityValue
An entity value.
- May have no key.
- May have a key with an incomplete key path.
- May have a reserved/read-only key.
hasEntityValue
setEntityValue
An entity value.
- May have no key.
- May have a key with an incomplete key path.
- May have a reserved/read-only key.
$this
getArrayValue
An array value.
Cannot contain another array value.
A Value
instance that sets field array_value
must not set fields meaning
or exclude_from_indexes
.
hasArrayValue
setArrayValue
An array value.
Cannot contain another array value.
A Value
instance that sets field array_value
must not set fields meaning
or exclude_from_indexes
.
$this
getMeaning
The meaning
field should only be populated for backwards compatibility.
int
setMeaning
The meaning
field should only be populated for backwards compatibility.
var
int
$this
getExcludeFromIndexes
If the value should be excluded from all indexes including those defined explicitly.
bool
setExcludeFromIndexes
If the value should be excluded from all indexes including those defined explicitly.
var
bool
$this
getValueType
string