Skip to content

Commit 5290e8c

Browse files
author
bitfl0wer
committed
2 parents 5d03cc0 + 02b5172 commit 5290e8c

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

sqlx-pg-uint-macros/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sqlx-pg-uint-macros"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
edition = "2021"
55
license = "MIT"
66
authors = ["bitfl0wer"]
@@ -11,5 +11,5 @@ rust-version = "1.61.0"
1111
proc-macro = true
1212

1313
[dependencies]
14-
quote = "1.0.37"
15-
syn = "2.0.79"
14+
quote = "1.0.38"
15+
syn = "2.0.98"

sqlx-pg-uint-macros/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,16 @@ pub fn uint_wrapper_derive(input: TokenStream) -> TokenStream {
155155
&self,
156156
buf: &mut <sqlx::Postgres as sqlx::Database>::ArgumentBuffer<'q>,
157157
) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
158-
self.inner.encode_by_ref(buf)
158+
<BigDecimal as sqlx::Encode<sqlx::Postgres>>::encode_by_ref(&self.inner, buf)
159159
}
160160
}
161161

162162
impl<'r> sqlx::Decode<'r, sqlx::Postgres> for #name {
163163
fn decode(
164164
value: <sqlx::Postgres as sqlx::Database>::ValueRef<'r>,
165165
) -> Result<Self, sqlx::error::BoxDynError> {
166-
let big_decimal = BigDecimal::decode(value)?;
166+
let big_decimal = <BigDecimal as sqlx::Decode<sqlx::Postgres>>::decode(value)
167+
?;
167168
Ok(#name::try_from(big_decimal)?)
168169
}
169170
}

sqlx-pg-uint/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sqlx-pg-uint"
3-
version = "0.8.1"
3+
version = "0.9.0"
44
edition = "2021"
55
license = "MIT"
66
authors = ["bitfl0wer"]

0 commit comments

Comments
 (0)