pub enum PathItem {
Show 17 variants
Null,
String(String),
Numeric(Numeric),
Bool(bool),
Binary(PathOp, Chain, Chain),
Unary(PathOp, Chain),
LikeRegex {
expr: Chain,
pattern: String,
flags: u8,
},
AnyArray,
AnyKey,
IndexArray(Vec<(Chain, Option<Chain>)>),
Any {
first: u32,
last: u32,
},
Key(String),
Current,
Root,
Variable(String),
Last,
Method(PathOp, Vec<PathItem>),
}Expand description
One item of a path. The items that follow an item, its next items in PostgreSQL, are the items after it in its Chain.
Variants§
Null
null.
String(String)
A string literal.
Numeric(Numeric)
A number literal.
Bool(bool)
true or false.
Binary(PathOp, Chain, Chain)
&&, ||, a comparison, an arithmetic operator or starts with, with the left and the right operand.
Unary(PathOp, Chain)
!, is unknown, unary + and -, the filter ?() and exists, with the operand.
LikeRegex
like_regex: the operand, the pattern and the bits of the flags.
AnyArray
[*].
AnyKey
.*.
IndexArray(Vec<(Chain, Option<Chain>)>)
[...]: each subscript, with the end of a range to.
Any
.**, with the first and the last level. JSONPATH_LAST is last.
Key(String)
.key.
Current
@.
Root
$.
Variable(String)
$name.
Last
last.
Method(PathOp, Vec<PathItem>)
A method such as .type(), with its arguments. An argument is a string or a number.
Trait Implementations§
impl StructuralPartialEq for PathItem
Auto Trait Implementations§
impl Freeze for PathItem
impl RefUnwindSafe for PathItem
impl Send for PathItem
impl Sync for PathItem
impl Unpin for PathItem
impl UnsafeUnpin for PathItem
impl UnwindSafe for PathItem
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