pub struct JsonbValue {
pub data: Value,
}Expand description
JSONB value returned from a database data column.
Wraps serde_json::Value for type-safety at the SQL → application
boundary: every adapter (postgres, mysql, sqlite, sqlserver) emits
Vec<JsonbValue> so that downstream consumers do not have to discriminate
between native database JSON columns and string-encoded JSON.
§Ownership contract (F029)
- Adapter-owned: the database adapter materialises
datainto an ownedserde_json::Valuebefore returning. There is no borrow of database buffers in this type — it is safe to keep across theawaitboundary that releases the database connection. - Projector input: consumers that project into GraphQL responses (see
fraiseql-core::runtime::projection::ResultProjector::project_results) take&[JsonbValue]and produce a freshly-allocatedserde_json::Valuetree. Projection never aliases the input; each field is cloned out. - Not part of the wire protocol:
JsonbValueis an internal shape and intentionally distinct fromserde_json::Valueso that the boundary between “raw database row” and “GraphQL response value” is visible in function signatures.
Fields§
§data: ValueThe JSONB data from the database data column.
Implementations§
Trait Implementations§
Source§impl Clone for JsonbValue
impl Clone for JsonbValue
Source§fn clone(&self) -> JsonbValue
fn clone(&self) -> JsonbValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonbValue
impl Debug for JsonbValue
Source§impl<'de> Deserialize<'de> for JsonbValue
impl<'de> Deserialize<'de> for JsonbValue
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
Auto Trait Implementations§
impl Freeze for JsonbValue
impl RefUnwindSafe for JsonbValue
impl Send for JsonbValue
impl Sync for JsonbValue
impl Unpin for JsonbValue
impl UnsafeUnpin for JsonbValue
impl UnwindSafe for JsonbValue
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