mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-01 06:52:19 +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 serde::{Deserialize, Serialize};
|
||||
use serde_json::value::RawValue as JsonRawValue;
|
||||
use serde_json::Value as JsonValue;
|
||||
pub use serde_json::value::RawValue as JsonRawValue;
|
||||
pub use serde_json::Value as JsonValue;
|
||||
|
||||
use crate::database::{Database, HasArguments, HasValueRef};
|
||||
use crate::decode::Decode;
|
||||
|
@ -83,7 +83,7 @@ pub mod mac_address {
|
||||
}
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
pub use json::Json;
|
||||
pub use json::{Json, JsonRawValue, JsonValue};
|
||||
|
||||
/// Indicates that a SQL type is supported for a database.
|
||||
///
|
||||
|
@ -51,7 +51,7 @@ impl_database_ext! {
|
||||
sqlx::types::Decimal,
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
serde_json::Value,
|
||||
sqlx::types::JsonValue,
|
||||
},
|
||||
ParamChecking::Weak,
|
||||
feature-types: info => info.__type_feature_gate(),
|
||||
|
@ -69,7 +69,7 @@ impl_database_ext! {
|
||||
sqlx::types::mac_address::MacAddress,
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
serde_json::Value,
|
||||
sqlx::types::JsonValue,
|
||||
|
||||
#[cfg(feature = "bit-vec")]
|
||||
sqlx::types::BitVec,
|
||||
@ -128,7 +128,7 @@ impl_database_ext! {
|
||||
Vec<sqlx::types::mac_address::MacAddress> | &[sqlx::types::mac_address::MacAddress],
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
Vec<serde_json::Value> | &[serde_json::Value],
|
||||
Vec<sqlx::types::JsonValue> | &[sqlx::types::JsonValue],
|
||||
|
||||
// Ranges
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user