pub fn key_exists(
lhs: &Value<'_>,
rhs: &Value<'_>,
) -> Result<Value<'static>, EvalError>Expand description
v6.4.5 — PG json @> sub_json containment. Returns BOOL.
lhs @> rhs is true when every member of rhs is structurally
contained in lhs:
- Scalars: equal
- Objects: every (key, value) in rhs exists in lhs with a containing value
- Arrays: every element in rhs has a containing element in lhs
v7.37.6-A — PG
jsonb ? text. Returns BOOL: true iff the key exists at the top level of the document. - Object: true iff
keyis a member name. - Array: true iff any element is exactly the JSON string
key. - Scalar string: true iff the scalar equals
key. - Other scalars / null: false. NULL on either side → NULL (SQL 3VL).