pub struct KineticaJson<T>(pub T);Values for the Kinetica types SQLx’s own PostgreSQL types cannot read or write over Kinetica’s protocol, or cannot reliably: see their module. A JSON column’s value: anything serde serializes, bound directly as JSON, and read back from the JSON Kinetica sends.
SQLx’s own serde_json::Value and sqlx::types::Json bind as PostgreSQL’s JSONB, whose binary form starts with a version byte, which Kinetica refuses as invalid JSON. This binds the JSON type instead, whose value is the JSON text itself, so it reaches its column in any parameter position. It reads JSON and JSONB columns, and text such as JSON_QUERY’s.
Tuple Fields
0: TTrait Implementations
impl<T: Clone> Clone for KineticaJson<T>
fn clone(&self) -> KineticaJson<T>
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<T: Copy> Copy for KineticaJson<T>
impl<T: Debug> Debug for KineticaJson<T>
impl<‘r, T: DeserializeOwned> Decode<‘r, Postgres> for KineticaJson<T>
impl<T: Default> Default for KineticaJson<T>
fn default() -> KineticaJson<T>
impl<T: Serialize> Encode<’_, Postgres> for KineticaJson<T>
fn encode_by_ref( &self, buf: &mut PgArgumentBuffer, ) -> Result<IsNull, BoxDynError>
self into buf in the expected format for the database.impl<T: Eq> Eq for KineticaJson<T>
impl<T: Hash> Hash for KineticaJson<T>
impl<T: Ord> Ord for KineticaJson<T>
impl<T: PartialEq> PartialEq for KineticaJson<T>
fn eq(&self, other: &KineticaJson<T>) -> bool
self and other values to be equal, and is used by ==.