@@ -425,6 +425,13 @@ test_type!(bigdecimal<sqlx::types::BigDecimal>(Postgres,
425
425
"12345.6789::numeric" == "12345.6789" . parse:: <sqlx:: types:: BigDecimal >( ) . unwrap( ) ,
426
426
) ) ;
427
427
428
+ #[ cfg( feature = "bigdecimal" ) ]
429
+ test_type ! ( numrange_bigdecimal<PgRange <sqlx:: types:: BigDecimal >>( Postgres ,
430
+ "'(1.3,2.4)'::numrange" == PgRange :: from(
431
+ ( Bound :: Excluded ( "1.3" . parse:: <sqlx:: types:: BigDecimal >( ) . unwrap( ) ) ,
432
+ Bound :: Excluded ( "2.4" . parse:: <sqlx:: types:: BigDecimal >( ) . unwrap( ) ) ) )
433
+ ) ) ;
434
+
428
435
#[ cfg( feature = "decimal" ) ]
429
436
test_type ! ( decimal<sqlx:: types:: Decimal >( Postgres ,
430
437
"0::numeric" == sqlx:: types:: Decimal :: from_str( "0" ) . unwrap( ) ,
@@ -436,6 +443,13 @@ test_type!(decimal<sqlx::types::Decimal>(Postgres,
436
443
"12345.6789::numeric" == sqlx:: types:: Decimal :: from_str( "12345.6789" ) . unwrap( ) ,
437
444
) ) ;
438
445
446
+ #[ cfg( feature = "decimal" ) ]
447
+ test_type ! ( numrange_decimal<PgRange <sqlx:: types:: Decimal >>( Postgres ,
448
+ "'(1.3,2.4)'::numrange" == PgRange :: from(
449
+ ( Bound :: Excluded ( sqlx:: types:: Decimal :: from_str( "1.3" ) . unwrap( ) ) ,
450
+ Bound :: Excluded ( sqlx:: types:: Decimal :: from_str( "2.4" ) . unwrap( ) ) ) ) ,
451
+ ) ) ;
452
+
439
453
const EXC2 : Bound < i32 > = Bound :: Excluded ( 2 ) ;
440
454
const EXC3 : Bound < i32 > = Bound :: Excluded ( 3 ) ;
441
455
const INC1 : Bound < i32 > = Bound :: Included ( 1 ) ;
0 commit comments