@@ -280,15 +280,15 @@ pub enum Value {
280280
281281 #[ cfg( feature = "with-jiff" ) ]
282282 #[ cfg_attr( docsrs, doc( cfg( feature = "with-jiff" ) ) ) ]
283- JiffDateTime ( Option < jiff:: civil:: DateTime > ) ,
283+ JiffDateTime ( Option < Box < jiff:: civil:: DateTime > > ) ,
284284
285285 #[ cfg( feature = "with-jiff" ) ]
286286 #[ cfg_attr( docsrs, doc( cfg( feature = "with-jiff" ) ) ) ]
287- JiffTimestamp ( Option < Timestamp > ) ,
287+ JiffTimestamp ( Option < Box < Timestamp > > ) ,
288288
289289 #[ cfg( feature = "with-jiff" ) ]
290290 #[ cfg_attr( docsrs, doc( cfg( feature = "with-jiff" ) ) ) ]
291- JiffZoned ( Option < Zoned > ) ,
291+ JiffZoned ( Option < Box < Zoned > > ) ,
292292
293293 #[ cfg( feature = "with-uuid" ) ]
294294 #[ cfg_attr( docsrs, doc( cfg( feature = "with-uuid" ) ) ) ]
@@ -326,8 +326,8 @@ pub enum Value {
326326pub const VALUE_SIZE : usize = check_value_size ( ) ;
327327
328328const fn check_value_size ( ) -> usize {
329- if std:: mem:: size_of :: < Value > ( ) > 120 {
330- panic ! ( "the size of Value shouldn't be greater than 120 bytes" )
329+ if std:: mem:: size_of :: < Value > ( ) > 32 {
330+ panic ! ( "the size of Value shouldn't be greater than 32 bytes" )
331331 }
332332 std:: mem:: size_of :: < Value > ( )
333333}
@@ -556,17 +556,19 @@ impl Value {
556556 #[ cfg( feature = "with-jiff" ) ]
557557 #[ cfg_attr( docsrs, doc( cfg( feature = "with-jiff" ) ) ) ]
558558 Self :: JiffDateTime ( _) => {
559- Self :: JiffDateTime ( Some ( jiff:: civil:: date ( 1970 , 1 , 1 ) . at ( 0 , 0 , 0 , 0 ) ) )
559+ Self :: JiffDateTime ( Some ( jiff:: civil:: date ( 1970 , 1 , 1 ) . at ( 0 , 0 , 0 , 0 ) . into ( ) ) )
560560 }
561561
562562 #[ cfg( feature = "with-jiff" ) ]
563563 #[ cfg_attr( docsrs, doc( cfg( feature = "with-jiff" ) ) ) ]
564- Self :: JiffTimestamp ( _) => Self :: JiffTimestamp ( Some ( Timestamp :: UNIX_EPOCH ) ) ,
564+ Self :: JiffTimestamp ( _) => Self :: JiffTimestamp ( Some ( Timestamp :: UNIX_EPOCH . into ( ) ) ) ,
565565
566566 #[ cfg( feature = "with-jiff" ) ]
567567 #[ cfg_attr( docsrs, doc( cfg( feature = "with-jiff" ) ) ) ]
568568 Self :: JiffZoned ( _) => Self :: JiffZoned ( Some (
569- Timestamp :: UNIX_EPOCH . to_zoned ( jiff:: tz:: TimeZone :: UTC ) ,
569+ Timestamp :: UNIX_EPOCH
570+ . to_zoned ( jiff:: tz:: TimeZone :: UTC )
571+ . into ( ) ,
570572 ) ) ,
571573
572574 #[ cfg( feature = "with-uuid" ) ]
@@ -803,7 +805,7 @@ type_to_value!(char, Char, Char(None));
803805type_to_value ! ( Vec <u8 >, Bytes , VarBinary ( StringLen :: None ) ) ;
804806type_to_value ! ( String , String , String ( StringLen :: None ) ) ;
805807
806- #[ cfg( feature = "with-bigdecimal" ) ]
808+ #[ cfg( any ( feature = "with-bigdecimal" , feature = "with-jiff" ) ) ]
807809macro_rules! type_to_box_value {
808810 ( $type: ty, $name: ident, $col_type: expr ) => {
809811 impl From <$type> for Value {
@@ -841,5 +843,6 @@ macro_rules! type_to_box_value {
841843 }
842844 } ;
843845}
844- #[ cfg( feature = "with-bigdecimal" ) ]
846+
847+ #[ cfg( any( feature = "with-bigdecimal" , feature = "with-jiff" ) ) ]
845848use type_to_box_value;
0 commit comments