Enum spanner_rs::Type
source · [−]pub enum Type {
Bool,
Int64,
Float64,
String,
Bytes,
Json,
Numeric,
Timestamp,
Date,
Array(Box<Type>),
Struct(StructType),
}
Expand description
An enumeration of all Cloud Spanner data types.
Refer to the Cloud Spanner documentation for detailed information about individual data types.
Variants
Bool
The BOOL
data type.
- Storage size: 1 byte
Int64
The INT64
data type.
- Storage size: 8 bytes
- Range:
-9,223,372,036,854,775,808
to9,223,372,036,854,775,807
Float64
String
Bytes
The BYTES
data type.
- Storage: the number of bytes
Json
The JSON
data type.
Note that the JSON document will be canonicalized before storing. Refer to the Cloud Spanner for details.
- Storage: The number of bytes in UTF-8 encoding of the JSON-formatted string equivalent after canonicalization.
Numeric
The NUMERIC
data type.
- Storage: varies between 6 and 22 bytes, except for the value 0 which uses 1 byte.
Timestamp
The TIMESTAMP
data type.
Refer to the Cloud Spanner documentation for details on timezones and format when used in SQL statements.
- Storage: 12 bytes
- Range:
0001-01-01 00:00:00
to9999-12-31 23:59:59.999999999
UTC.
Date
The DATE
data type.
- Storage: 4 bytes
- Range:
0001-01-01
to9999-12-31
. - Canonical format:
YYYY-[M]M-[D]D
Array(Box<Type>)
The ARRAY
data type.
Can contain elements of any other type except Array
(i.e.: arrays of arrays are not allowed).
Can contain NULL
elements.
A NULL
value of type array and an empty array are different values.
- Storage: the sum of the size of its elements
Struct(StructType)
The STRUCT
data type.
Implementations
Trait Implementations
impl StructuralPartialEq for Type
Auto Trait Implementations
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request