Skip to main content

key_exists

Function key_exists 

Source
pub fn key_exists(
    lhs: &Value<'_>,
    rhs: &Value<'_>,
) -> Result<Value<'static>, EvalError>
Expand description

v7.37.6-A — PG jsonb ? text. Returns BOOL: true iff the key exists at the top level of the document.

  • Object: true iff key is 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).