diff --git a/Cargo.toml b/Cargo.toml index df8e7d6..d5f082d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "julid-rs" # 1.61803398874989484 -# ^ -version = "1.6.180339887" +# ^ +version = "1.6.1803398874" authors = ["Joe Ardent "] edition = "2024" keywords = ["ulid", "sqlite", "julid", "uuid", "guid"] @@ -35,13 +35,13 @@ chrono = { version = "0.4", default-features = false, features = ["std", "time"] # all other deps are optional serde = { version = "1.0", features = ["derive"], optional = true } -sqlx = { version = "0.7", features = ["sqlite"], default-features = false, optional = true } +sqlx = { version = "0.8", features = ["sqlite"], default-features = false, optional = true } sqlite-loadable = { version = "0.0.5", optional = true } uuid = { version = "1.17", default-features = false, optional = true } [dev-dependencies] divan = "0.1" -uuid = { version = "1.17", default-features = false, features = ["v7"] } +uuid = { version = "1", default-features = false, features = ["v7"] } julid-rs = { path = ".", features = ["uuid"] } [[bench]] diff --git a/README.md b/README.md index 44ac5c4..26f57e5 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,9 @@ Docs.rs: Blog post: +As of June of 2025, they can also be converted to and from [version 7 +UUIDs](https://www.ietf.org/rfc/rfc9562.html#name-uuid-version-7), though some precision in the +intra-millisecond counter is lost when going to a UUID. ## A slightly deeper look diff --git a/VERSION b/VERSION index 2fce4ea..baa431b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6180339887 +1.61803398874 diff --git a/src/sqlx.rs b/src/sqlx.rs index ad26855..3937f9c 100644 --- a/src/sqlx.rs +++ b/src/sqlx.rs @@ -15,11 +15,17 @@ impl sqlx::Type for Julid { } impl<'q> Encode<'q, Sqlite> for Julid { - fn encode_by_ref(&self, args: &mut Vec>) -> IsNull { + fn encode_by_ref( + &self, + args: &mut Vec>, + ) -> std::result::Result< + sqlx::encode::IsNull, + std::boxed::Box<(dyn std::error::Error + std::marker::Send + std::marker::Sync + 'static)>, + > { args.push(SqliteArgumentValue::Blob(Cow::Owned( self.as_bytes().to_vec(), ))); - IsNull::No + Ok(IsNull::No) } }