diff --git a/docs/source/data-types/timeuuid.md b/docs/source/data-types/timeuuid.md index bdbdf24f7d..82e0fdd42b 100644 --- a/docs/source/data-types/timeuuid.md +++ b/docs/source/data-types/timeuuid.md @@ -1,7 +1,7 @@ # Timeuuid `Timeuuid` is represented as `value::CqlTimeuuid`. -`value::CqlTimeuuid` is a wrapper for `uuid::Uuid` with custom ordering logic +`value::CqlTimeuuid` is a wrapper for `uuid::Uuid` (using the `v1` feature) with custom ordering logic which follows Scylla/Cassandra semantics. ```rust @@ -9,9 +9,9 @@ which follows Scylla/Cassandra semantics. # use scylla::Session; # use std::error::Error; # use std::str::FromStr; +# async fn check_only_compiles(session: &Session) -> Result<(), Box> { use scylla::IntoTypedRows; use scylla::frame::value::CqlTimeuuid; -# async fn check_only_compiles(session: &Session) -> Result<(), Box> { // Insert some timeuuid into the table let to_insert: CqlTimeuuid = CqlTimeuuid::from_str("8e14e760-7fa8-11eb-bc66-000000000001")?; @@ -29,7 +29,6 @@ if let Some(rows) = session.query("SELECT a FROM keyspace.table", &[]).await?.ro # } ``` - To use the Timeuuid on `uuid` crate, enable the feature `v1` in your crate using: ```shell @@ -39,13 +38,14 @@ cargo add uuid -F v1 and now you're gonna be able to use the `uuid::v1` features: ```rust +# extern crate uuid; # extern crate scylla; # use scylla::Session; # use std::error::Error; # use std::str::FromStr; use scylla::IntoTypedRows; -use uuid::Uuid; use scylla::frame::value::CqlTimeuuid; +use uuid::Uuid; # async fn check_only_compiles(session: &Session) -> Result<(), Box> { // Insert some timeuuid into the table