Value
October 25, 2024 ยท View on GitHub
Description
A message that can hold any of the supported value types.
This class is in the Values namespace.
class Value
Constructors
The default constructor.
Value()
Params:
name- The resource name of the document.
The constructor with the object value.
See the below supported objects classes.
Value(T value)
Params:
value- The object value.
NullValue
Description
A null value.
This class is in the Values namespace.
class NullValue
Constructors
The default constructor.
NullValue()
StringValue
Description
A string value.
This class is in the Values namespace.
class StringValue
Constructors
The constructor with string value.
StringValue(const String &value)
Params:
value- The string value.
BooleanValue
Description
A boolean value.
This class is in the Values namespace.
class BooleanValue
Constructors
The constructor with boolean value.
BooleanValue(bool value)
Params:
value- The boolean value.
IntegerValue
Description
A 64-bit signed integer value.
This class is in the Values namespace.
class IntegerValue
Constructors
The constructor with a 64-bit signed integer value.
IntegerValue(int64_t value)
Params:
value- The 64-bit signed integer value.
DoubleValue
Description
A double value.
This class is in the Values namespace.
class DoubleValue
Constructors
The constructor with double value.
This constructor is obsoleted.
DoubleValue(double value)
Params:
value- The double value.
The constructor with number_t represents the double value.
DoubleValue(const number_t &value)
Params:
value- Thenumber_trepresents the double value.
TimestampValue
Description
A timestampValue value.
This class is in the Values namespace.
class TimestampValue
Constructors
The constructor with timestamp value string.
Precise only to microseconds. When stored, any additional precision is rounded down.
TimestampValue(const String &value)
Params:
value- The timestamp value string.
BytesValue
Description
A bytes value.
This class is in the Values namespace.
class BytesValue
Constructors
The constructor with timestamp (base64-encoded) value string.
Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries.
BytesValue(const String &value)
Params:
value- The bytes (base64-encoded) value string.
ReferenceValue
Description
A reference to a document.
This class is in the Values namespace.
class ReferenceValue
Constructors
The constructor with resource name string.
ReferenceValue(const String &value)
Params:
value- The resource name of document.
GeoPointValue
Description
A geo point representing a point on the surface of Earth.
This class is in the Values namespace.
class GeoPointValue
Constructors
The constructor with latitude and longitude.
This constructor is obsoleted.
GeoPointValue(double lat, double lng)
Params:
-
lat- The latitude. -
lng- The longitude.
The constructor with latitude and longitude.
This constructor is obsoleted.
GeoPointValue(const number_t &lat, const number_t &lng)
Params:
-
lat- Thenumber_trepresents the latitude value. -
lng- Thenumber_trepresents the latitude value.
ArrayValue
Description
An array value.
This class is in the Values namespace.
class ArrayValue
Constructors
The constructor with object.
Cannot directly contain another array value, though can contain an map which contains another array.
ArrayValue(T value)
Params:
value- The object except for array value.
MapValue
Description
A map value.
This class is in the Values namespace.
class MapValue
Constructors
The constructor with key and object value.
MapValue(const String &key, T value)
Params:
-
key- The key. -
value- The object value.
Functions
Add key and value pair to a map.
MapValue &add(const String &key, T value)
Params:
-
key- The key. -
value- The object value.