@@ -8,6 +8,8 @@ pub enum Value<'a> {
88 Null ,
99 I32 ( i32 ) ,
1010 I64 ( i64 ) ,
11+ U32 ( u32 ) ,
12+ U64 ( u64 ) ,
1113 F32 ( f32 ) ,
1214 F64 ( f64 ) ,
1315 Timestamp ( i64 ) ,
@@ -25,6 +27,8 @@ impl Display for Value<'_> {
2527 Value :: Null => write ! ( f, "NULL" ) ,
2628 Value :: I32 ( v) => write ! ( f, "{}" , v) ,
2729 Value :: I64 ( v) => write ! ( f, "{}" , v) ,
30+ Value :: U32 ( v) => write ! ( f, "{}" , v) ,
31+ Value :: U64 ( v) => write ! ( f, "{}" , v) ,
2832 Value :: F32 ( v) => write ! ( f, "{}" , v) ,
2933 Value :: F64 ( v) => write ! ( f, "{}" , v) ,
3034 Value :: Timestamp ( v) => write ! ( f, "{}" , v) ,
@@ -49,14 +53,14 @@ impl Value<'_> {
4953 }
5054 match t {
5155 DataType :: Null => Self :: Null ,
52- DataType :: TinyInt => Self :: I32 ( xdb_column_int ( res , row , i ) ) ,
53- DataType :: SmallInt => Self :: I32 ( xdb_column_int ( res, row, i) ) ,
54- DataType :: Int => Self :: I32 ( xdb_column_int ( res , row , i ) ) ,
56+ DataType :: TinyInt | DataType :: SmallInt | DataType :: Int => {
57+ Self :: I32 ( xdb_column_int ( res, row, i) )
58+ }
5559 DataType :: BigInt => Self :: I64 ( xdb_column_int64 ( res, row, i) ) ,
56- DataType :: UTinyInt => todo ! ( ) ,
57- DataType :: USmallInt => todo ! ( ) ,
58- DataType :: UInt => todo ! ( ) ,
59- DataType :: UBigInt => todo ! ( ) ,
60+ DataType :: UTinyInt | DataType :: USmallInt | DataType :: UInt => {
61+ Self :: U32 ( xdb_column_uint ( res , row , i ) )
62+ }
63+ DataType :: UBigInt => Self :: U64 ( xdb_column_uint64 ( res , row , i ) ) ,
6064 DataType :: Float => Self :: F32 ( xdb_column_float ( res, row, i) ) ,
6165 DataType :: Double => Self :: F64 ( xdb_column_double ( res, row, i) ) ,
6266 DataType :: Timestamp => Self :: Timestamp ( xdb_column_int64 ( res, row, i) ) ,
@@ -96,6 +100,7 @@ impl Value<'_> {
96100 let address = MacAddress :: new ( mac. addr ) ;
97101 Self :: Mac ( address)
98102 }
103+ DataType :: Json => todo ! ( ) ,
99104 DataType :: Array => todo ! ( ) ,
100105 DataType :: Max => todo ! ( ) ,
101106 }
0 commit comments