diff --git a/docs/source/data-types/data-types.md b/docs/source/data-types/data-types.md index e03c82233e..0d9696e765 100644 --- a/docs/source/data-types/data-types.md +++ b/docs/source/data-types/data-types.md @@ -26,7 +26,7 @@ Database types and their Rust equivalents: * `Time` <----> `value::CqlTime`, `chrono::NaiveTime`, `time::Time` * `Timestamp` <----> `value::CqlTimestamp`, `chrono::DateTime`, `time::OffsetDateTime` * `Duration` <----> `value::CqlDuration` -* `Decimal` <----> `bigdecimal::Decimal` +* `Decimal` <----> `value::CqlDecimal`, `bigdecimal::Decimal` * `Varint` <----> `value::CqlVarint`, `num_bigint::BigInt` (v0.3 and v0.4) * `List` <----> `Vec` * `Set` <----> `Vec` diff --git a/docs/source/data-types/decimal.md b/docs/source/data-types/decimal.md index d3d7b45feb..723a33a2c0 100644 --- a/docs/source/data-types/decimal.md +++ b/docs/source/data-types/decimal.md @@ -1,5 +1,14 @@ # Decimal -`Decimal` is represented as [`bigdecimal::BigDecimal`](https://docs.rs/bigdecimal/0.2.0/bigdecimal/struct.BigDecimal.html) +`Decimal` is represented as `value::CqlDecimal` or [`bigdecimal::BigDecimal`](https://docs.rs/bigdecimal/latest/bigdecimal/struct.BigDecimal.html) + +## bigdecimal::BigDecimal + +To make use of `bigdecimal::Bigdecimal` type, user should enable `bigdecimal-04` crate feature. + +## value::CqlDecimal + +Without any feature flags, the user can interact with `decimal` type by making use of `value::CqlDecimal` which +is a very simple wrapper representing the value as signed binary number in big-endian order with a 64-bit scale. ```rust # extern crate scylla;