pub enum RawCell {
Fixed,
Real,
Text,
Binary,
Boolean,
Date,
Time,
TimestampLtz,
TimestampNtz,
TimestampTz,
}
Expand description
The format Snowflake used for serializing data in a column
This is not usually necessary unless you intend to implement your own deserialization of Snowflake data.
Variants§
Fixed
A 128-bit signed integer, 38 digits of precision.
Real
A 64-bit floating point number, 15 digits of precision.
Text
A variable length string. It must be valid UTF-8.
Binary
A variable length binary string.
Boolean
A boolean value.
Date
A date without a time zone, as the number of days since 1970-01-01.
Time
A time without a time zone, as the number of seconds since midnight.
TimestampLtz
A timestamp with the local time zone.
TimestampNtz
A timestamp without a time zone.
TimestampTz
A timestamp with a time zone for each value. This is not supported yet.
Implementations§
source§impl RawCell
impl RawCell
sourcepub fn to_cell(&self, value: &Option<String>) -> Cell
pub fn to_cell(&self, value: &Option<String>) -> Cell
Convert a RawCell into a Cell.
There are many possible panics in this conversion, but they depend generally on Snowflake returning a value that can be parsed.
- Decimals are not supported. Number type columns are converted to i128 if possible, otherwise f64. So there can be a loss of precision, which is a tradeoff for convenience.
- For the same reason, NUMBER columns can contain mixed types: Int and Float