@@ -79,11 +79,10 @@ impl Column {
79
79
ColumnType :: Bit ( None | Some ( 1 ) ) => "bool" . to_owned ( ) ,
80
80
ColumnType :: Bit ( _) | ColumnType :: VarBit ( _) => "Vec<u8>" . to_owned ( ) ,
81
81
ColumnType :: Year => "i32" . to_owned ( ) ,
82
- ColumnType :: Interval ( _, _)
83
- | ColumnType :: Cidr
84
- | ColumnType :: Inet
85
- | ColumnType :: MacAddr
86
- | ColumnType :: LTree => "String" . to_owned ( ) ,
82
+ ColumnType :: Cidr | ColumnType :: Inet => "IpNetwork" . to_owned ( ) ,
83
+ ColumnType :: Interval ( _, _) | ColumnType :: MacAddr | ColumnType :: LTree => {
84
+ "String" . to_owned ( )
85
+ }
87
86
_ => unimplemented ! ( ) ,
88
87
}
89
88
}
@@ -112,6 +111,7 @@ impl Column {
112
111
StringLen :: Max => Some ( "VarBinary(StringLen::Max)" . to_owned ( ) ) ,
113
112
} ,
114
113
ColumnType :: Blob => Some ( "Blob" . to_owned ( ) ) ,
114
+ ColumnType :: Cidr => Some ( "Cidr" . to_owned ( ) ) ,
115
115
_ => None ,
116
116
} ;
117
117
col_type. map ( |ty| quote ! { column_type = #ty } )
@@ -168,6 +168,8 @@ impl Column {
168
168
ColumnType :: Json => quote ! { ColumnType :: Json } ,
169
169
ColumnType :: JsonBinary => quote ! { ColumnType :: JsonBinary } ,
170
170
ColumnType :: Uuid => quote ! { ColumnType :: Uuid } ,
171
+ ColumnType :: Cidr => quote ! { ColumnType :: Cidr } ,
172
+ ColumnType :: Inet => quote ! { ColumnType :: Inet } ,
171
173
ColumnType :: Custom ( s) => {
172
174
let s = s. to_string ( ) ;
173
175
quote ! { ColumnType :: custom( #s) }
0 commit comments