Bump the version of sqlx, update the readme.
This commit is contained in:
parent
eabcc26276
commit
acb32e56a6
4 changed files with 16 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
||||||
[package]
|
[package]
|
||||||
name = "julid-rs"
|
name = "julid-rs"
|
||||||
# 1.61803398874989484
|
# 1.61803398874989484
|
||||||
# ^
|
# ^
|
||||||
version = "1.6.180339887"
|
version = "1.6.1803398874"
|
||||||
authors = ["Joe Ardent <code@ardent.nebcorp.com>"]
|
authors = ["Joe Ardent <code@ardent.nebcorp.com>"]
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
keywords = ["ulid", "sqlite", "julid", "uuid", "guid"]
|
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
|
# all other deps are optional
|
||||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
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 }
|
sqlite-loadable = { version = "0.0.5", optional = true }
|
||||||
uuid = { version = "1.17", default-features = false, optional = true }
|
uuid = { version = "1.17", default-features = false, optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
divan = "0.1"
|
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"] }
|
julid-rs = { path = ".", features = ["uuid"] }
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
|
|
|
@ -30,6 +30,9 @@ Docs.rs: <https://docs.rs/julid-rs/latest/julid/>
|
||||||
|
|
||||||
Blog post: <https://proclamations.nebcorp-hias.com/sundries/presenting-julids/>
|
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
|
## A slightly deeper look
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.6180339887
|
1.61803398874
|
||||||
|
|
10
src/sqlx.rs
10
src/sqlx.rs
|
@ -15,11 +15,17 @@ impl sqlx::Type<sqlx::Sqlite> for Julid {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'q> Encode<'q, 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(
|
args.push(SqliteArgumentValue::Blob(Cow::Owned(
|
||||||
self.as_bytes().to_vec(),
|
self.as_bytes().to_vec(),
|
||||||
)));
|
)));
|
||||||
IsNull::No
|
Ok(IsNull::No)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue