mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-03 07:45:30 +00:00
fix serde_json usage in macros (#1842)
This commit is contained in:
parent
a110e75b95
commit
1b9c40b3c8
@ -1,8 +1,8 @@
|
|||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::value::RawValue as JsonRawValue;
|
pub use serde_json::value::RawValue as JsonRawValue;
|
||||||
use serde_json::Value as JsonValue;
|
pub use serde_json::Value as JsonValue;
|
||||||
|
|
||||||
use crate::database::{Database, HasArguments, HasValueRef};
|
use crate::database::{Database, HasArguments, HasValueRef};
|
||||||
use crate::decode::Decode;
|
use crate::decode::Decode;
|
||||||
|
@ -83,7 +83,7 @@ pub mod mac_address {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
pub use json::Json;
|
pub use json::{Json, JsonRawValue, JsonValue};
|
||||||
|
|
||||||
/// Indicates that a SQL type is supported for a database.
|
/// Indicates that a SQL type is supported for a database.
|
||||||
///
|
///
|
||||||
|
@ -51,7 +51,7 @@ impl_database_ext! {
|
|||||||
sqlx::types::Decimal,
|
sqlx::types::Decimal,
|
||||||
|
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
serde_json::Value,
|
sqlx::types::JsonValue,
|
||||||
},
|
},
|
||||||
ParamChecking::Weak,
|
ParamChecking::Weak,
|
||||||
feature-types: info => info.__type_feature_gate(),
|
feature-types: info => info.__type_feature_gate(),
|
||||||
|
@ -69,7 +69,7 @@ impl_database_ext! {
|
|||||||
sqlx::types::mac_address::MacAddress,
|
sqlx::types::mac_address::MacAddress,
|
||||||
|
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
serde_json::Value,
|
sqlx::types::JsonValue,
|
||||||
|
|
||||||
#[cfg(feature = "bit-vec")]
|
#[cfg(feature = "bit-vec")]
|
||||||
sqlx::types::BitVec,
|
sqlx::types::BitVec,
|
||||||
@ -128,7 +128,7 @@ impl_database_ext! {
|
|||||||
Vec<sqlx::types::mac_address::MacAddress> | &[sqlx::types::mac_address::MacAddress],
|
Vec<sqlx::types::mac_address::MacAddress> | &[sqlx::types::mac_address::MacAddress],
|
||||||
|
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
Vec<serde_json::Value> | &[serde_json::Value],
|
Vec<sqlx::types::JsonValue> | &[sqlx::types::JsonValue],
|
||||||
|
|
||||||
// Ranges
|
// Ranges
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user