Struct FuncJsonExtract
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§
§impl Clone for FuncJsonExtract
impl Clone for FuncJsonExtract
§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 more§impl Debug for FuncJsonExtract
impl Debug for FuncJsonExtract
§impl From<FuncJsonExtract> for Expr
impl From<FuncJsonExtract> for Expr
§fn from(value: FuncJsonExtract) -> Expr
fn from(value: FuncJsonExtract) -> Expr
Converts to this type from the input type.
§impl From<FuncJsonExtract> for ExprFunc
impl From<FuncJsonExtract> for ExprFunc
§fn from(value: FuncJsonExtract) -> ExprFunc
fn from(value: FuncJsonExtract) -> ExprFunc
Converts to this type from the input type.
§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