Skip to content

Commit

Permalink
feat: impl deserializevalue for primitivedatetime
Browse files Browse the repository at this point in the history
  • Loading branch information
dracarys18 committed Nov 13, 2024
1 parent 436f60f commit a03c61d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scylla-cql/src/types/deserialize/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,16 @@ impl_emptiable_strict_type!(
}
);

#[cfg(feature = "time-03")]
impl_emptiable_strict_type!(
time_03::PrimitiveDateTime,
Timestamp,
|typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>| {
let time = time_03::OffsetDateTime::deserialize(typ, v)?;
Ok(Self::new(time.date(), time.time()))
}
);

// inet

impl_emptiable_strict_type!(
Expand Down

0 comments on commit a03c61d

Please sign in to comment.