Skip to content

Commit 4ad2d1c

Browse files
committed
Fix
1 parent c98a95f commit 4ad2d1c

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

sea-query-binder/src/sqlx_mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl sqlx::IntoArguments<'_, sqlx::mysql::MySql> for SqlxValues {
100100
}
101101
#[cfg(feature = "with-bigdecimal")]
102102
Value::BigDecimal(d) => {
103-
let _ = args.add(d.as_deref());
103+
let _ = args.add(d.as_ref());
104104
}
105105
#[cfg(feature = "with-json")]
106106
Value::Json(j) => {

sea-query-binder/src/sqlx_postgres.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl sqlx::IntoArguments<'_, sqlx::postgres::Postgres> for SqlxValues {
115115
}
116116
#[cfg(feature = "with-bigdecimal")]
117117
Value::BigDecimal(d) => {
118-
let _ = args.add(d.as_deref());
118+
let _ = args.add(d.as_ref());
119119
}
120120
#[cfg(feature = "with-json")]
121121
Value::Json(j) => {

sea-query-postgres/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl ToSql for PostgresValue {
104104
#[cfg(feature = "with-bigdecimal")]
105105
Value::BigDecimal(v) => {
106106
use bigdecimal::ToPrimitive;
107-
v.as_deref()
107+
v.as_ref()
108108
.map(|v| v.to_f64().expect("Fail to convert bigdecimal as f64"))
109109
.to_sql(ty, out)
110110
}

src/value.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ type_to_value!(Vec<u8>, Bytes, VarBinary(StringLen::None));
804804
type_to_value!(String, String, String(StringLen::None));
805805

806806
#[cfg(any(feature = "with-bigdecimal", feature = "with-jiff"))]
807+
#[allow(unused)]
807808
macro_rules! type_to_box_value {
808809
( $type: ty, $name: ident, $col_type: expr ) => {
809810
impl From<$type> for Value {
@@ -843,4 +844,5 @@ macro_rules! type_to_box_value {
843844
}
844845

845846
#[cfg(any(feature = "with-bigdecimal", feature = "with-jiff"))]
847+
#[allow(unused)]
846848
use type_to_box_value;

0 commit comments

Comments
 (0)