File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ pub fn sql_nonnull_to_json<'r>(mut get_ref: impl FnMut() -> sqlx::any::AnyValueR
4444 let type_info = raw_value. type_info ( ) ;
4545 let type_name = type_info. name ( ) ;
4646 log:: trace!( "Decoding a value of type {:?}" , type_name) ;
47+ dbg ! ( & type_name) ;
4748 match type_name {
4849 "REAL" | "FLOAT" | "FLOAT4" | "FLOAT8" | "DOUBLE" | "NUMERIC" | "DECIMAL" => {
4950 <f64 as Decode < sqlx:: any:: Any > >:: decode ( raw_value)
@@ -208,11 +209,10 @@ mod tests {
208209 CAST(42 AS SIGNED) as signed_int,
209210 CAST(42 AS UNSIGNED) as unsigned_int,
210211 42.42 as decimal_number,
211- TRUE as boolean,
212212 CAST('2024-03-14' AS DATE) as date,
213213 CAST('13:14:15' AS TIME) as time,
214214 CAST('2024-03-14 13:14:15' AS DATETIME) as datetime,
215- CAST('{ \" key\" : \" value\" }' AS JSON ) as json" ,
215+ json_object(' key', ' value' ) as json" ,
216216 )
217217 . fetch_one ( & mut c)
218218 . await ?;
@@ -223,7 +223,6 @@ mod tests {
223223 "signed_int" : 42 ,
224224 "unsigned_int" : 42 ,
225225 "decimal_number" : 42.42 ,
226- "boolean" : true ,
227226 "date" : "2024-03-14" ,
228227 "time" : "13:14:15" ,
229228 "datetime" : "2024-03-14T13:14:15+00:00" ,
You can’t perform that action at this time.
0 commit comments