Method: Sequel::Postgres::JSONBOp#path_exists

Defined in:
lib/sequel/extensions/pg_json_ops.rb

#path_exists(path) ⇒ Object

Returns whether the JSON path returns any item for the json object.

json_op.path_exists("$.foo") # (json @? '$.foo')
[View source]

665
666
667
# File 'lib/sequel/extensions/pg_json_ops.rb', line 665

def path_exists(path)
  bool_op(PATH_EXISTS, path)
end