pub struct FuncJsonExtract {
pub base: Box<Expr>,
pub path: Vec<String>,
pub ty: Type,
}Expand description
Extracts the value at a key path from a document-stored value.
Produced when a query filters on a field inside a #[document] embed:
User::FIELDS.preferences().theme() lowers to a JsonExtract over the
preferences document column with path = ["theme"]. The SQL serializer
renders it per dialect — col->'a'->>'b' on PostgreSQL, json_extract(col, '$.a.b') on SQLite / MySQL.
Fields§
§base: Box<Expr>The document value to extract from — typically a column reference.
path: Vec<String>The key path from the document root to the extracted field, in order.
ty: TypeThe type of the extracted value (the leaf field’s type).
Trait Implementations§
Source§impl Clone for FuncJsonExtract
impl Clone for FuncJsonExtract
Source§fn clone(&self) -> FuncJsonExtract
fn clone(&self) -> FuncJsonExtract
Returns a duplicate of the value. Read more
1.0.0 · 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 FuncJsonExtract
impl Debug for FuncJsonExtract
Source§impl From<FuncJsonExtract> for Expr
impl From<FuncJsonExtract> for Expr
Source§fn from(value: FuncJsonExtract) -> Self
fn from(value: FuncJsonExtract) -> Self
Converts to this type from the input type.
Source§impl From<FuncJsonExtract> for ExprFunc
impl From<FuncJsonExtract> for ExprFunc
Source§fn from(value: FuncJsonExtract) -> Self
fn from(value: FuncJsonExtract) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FuncJsonExtract
impl PartialEq for FuncJsonExtract
impl StructuralPartialEq for FuncJsonExtract
Auto Trait Implementations§
impl Freeze for FuncJsonExtract
impl RefUnwindSafe for FuncJsonExtract
impl Send for FuncJsonExtract
impl Sync for FuncJsonExtract
impl Unpin for FuncJsonExtract
impl UnsafeUnpin for FuncJsonExtract
impl UnwindSafe for FuncJsonExtract
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