Enum google_cloud_googleapis::spanner::v1::TypeCode [−][src]
#[repr(i32)]
pub enum TypeCode {
Unspecified,
Bool,
Int64,
Float64,
Timestamp,
Date,
String,
Bytes,
Array,
Struct,
Numeric,
Json,
}Expand description
TypeCode is used as part of [Type][google.spanner.v1.Type] to
indicate the type of a Cloud Spanner value.
Each legal value of a type can be encoded to or decoded from a JSON
value, using the encodings described below. All Cloud Spanner values can
be null, regardless of type; nulls are always encoded as a JSON
null.
Variants
Unspecified
Not specified.
Bool
Encoded as JSON true or false.
Int64
Encoded as string, in decimal format.
Float64
Encoded as number, or the strings "NaN", "Infinity", or
"-Infinity".
Timestamp
Encoded as string in RFC 3339 timestamp format. The time zone
must be present, and must be "Z".
If the schema has the column option
allow_commit_timestamp=true, the placeholder string
"spanner.commit_timestamp()" can be used to instruct the system
to insert the commit timestamp associated with the transaction
commit.
Date
Encoded as string in RFC 3339 date format.
String
Encoded as string.
Bytes
Encoded as a base64-encoded string, as described in RFC 4648,
section 4.
Array
Encoded as list, where the list elements are represented
according to
[array_element_type][google.spanner.v1.Type.array_element_type].
Struct
Encoded as list, where list element i is represented according
to [struct_type.fields[i]][google.spanner.v1.StructType.fields].
Numeric
Encoded as string, in decimal format or scientific notation format.
Decimal format:
\[+-]Digits[.[Digits]\] or
\[+-][Digits\].Digits
Scientific notation:
\[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits\] or
\[+-][Digits].Digits[ExponentIndicator[+-]Digits\]
(ExponentIndicator is "e" or "E")
Json
Encoded as a JSON-formatted ‘string’ as described in RFC 7159. The following rules will be applied when parsing JSON input:
- Whitespace will be stripped from the document.
- If a JSON object has duplicate keys, only the first key will be preserved.
- Members of a JSON object are not guaranteed to have their order preserved. JSON array elements will have their order preserved.
Implementations
Trait Implementations
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for TypeCode
impl UnwindSafe for TypeCode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more