Skip to content

Commit

Permalink
Added support all variants of NUMERIC[] using decimal feature lik…
Browse files Browse the repository at this point in the history
…e `bigdecimal` does. (#1781)
  • Loading branch information
tm-drtina authored Apr 4, 2022
1 parent f858138 commit f4ed7e6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sqlx-macros/src/database/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ impl_database_ext! {
#[cfg(feature = "bigdecimal")]
Vec<sqlx::types::BigDecimal> | &[sqlx::types::BigDecimal],

#[cfg(feature = "decimal")]
Vec<sqlx::types::Decimal> | &[sqlx::types::Decimal],

#[cfg(feature = "ipnetwork")]
Vec<sqlx::types::ipnetwork::IpNetwork> | &[sqlx::types::ipnetwork::IpNetwork],

Expand All @@ -134,6 +137,9 @@ impl_database_ext! {
#[cfg(feature = "bigdecimal")]
sqlx::postgres::types::PgRange<sqlx::types::BigDecimal>,

#[cfg(feature = "decimal")]
sqlx::postgres::types::PgRange<sqlx::types::Decimal>,

#[cfg(feature = "chrono")]
sqlx::postgres::types::PgRange<sqlx::types::chrono::NaiveDate>,

Expand Down Expand Up @@ -162,6 +168,10 @@ impl_database_ext! {
Vec<sqlx::postgres::types::PgRange<sqlx::types::BigDecimal>> |
&[sqlx::postgres::types::PgRange<sqlx::types::BigDecimal>],

#[cfg(feature = "decimal")]
Vec<sqlx::postgres::types::PgRange<sqlx::types::Decimal>> |
&[sqlx::postgres::types::PgRange<sqlx::types::Decimal>],

#[cfg(feature = "chrono")]
Vec<sqlx::postgres::types::PgRange<sqlx::types::chrono::NaiveDate>> |
&[sqlx::postgres::types::PgRange<sqlx::types::chrono::NaiveDate>],
Expand Down

0 comments on commit f4ed7e6

Please sign in to comment.