Bump the version of sqlx, update the readme.

This commit is contained in:
Joe Ardent 2025-06-22 16:13:03 -07:00
parent eabcc26276
commit acb32e56a6
4 changed files with 16 additions and 7 deletions

View file

@ -1,8 +1,8 @@
[package]
name = "julid-rs"
# 1.61803398874989484
# ^
version = "1.6.180339887"
# ^
version = "1.6.1803398874"
authors = ["Joe Ardent <code@ardent.nebcorp.com>"]
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]]

View file

@ -30,6 +30,9 @@ Docs.rs: <https://docs.rs/julid-rs/latest/julid/>
Blog post: <https://proclamations.nebcorp-hias.com/sundries/presenting-julids/>
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

View file

@ -1 +1 @@
1.6180339887
1.61803398874

View file

@ -15,11 +15,17 @@ impl sqlx::Type<sqlx::Sqlite> for Julid {
}
impl<'q> Encode<'q, Sqlite> for Julid {
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull {
fn encode_by_ref(
&self,
args: &mut Vec<SqliteArgumentValue<'q>>,
) -> 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)
}
}