pub struct Json { /* private fields */ }Expand description
Json data type for the DBMS.
It contains a JSON object represented using serde_json::Value.
A default instance of Json is null.
§Ordering
Json values are ordered using a type-based hierarchical ordering scheme:
- Type precedence:
Null < Bool < Number < String < Array < Object - Within same type:
- Null: all equal
- Bool:
false < true - Number: numeric comparison (integers compared as i64, floats as f64)
- String: lexicographic comparison
- Array: element-wise lexicographic comparison
- Object: keys sorted alphabetically, then key-value pairs compared lexicographically
This ordering is deterministic and suitable for indexing and sorting operations, though comparing values of different types may not be semantically meaningful.
Implementations§
Trait Implementations§
Source§impl CandidType for Json
impl CandidType for Json
Source§impl<'de> Deserialize<'de> for Json
impl<'de> Deserialize<'de> for Json
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for Json
impl Encode for Json
Source§impl Ord for Json
impl Ord for Json
Source§impl PartialOrd for Json
impl PartialOrd for Json
impl DataType for Json
impl Eq for Json
Auto Trait Implementations§
impl Freeze for Json
impl RefUnwindSafe for Json
impl Send for Json
impl Sync for Json
impl Unpin for Json
impl UnwindSafe for Json
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more