Method: Sequel::Postgres::JSONBOp#path_query_array
- Defined in:
- lib/sequel/extensions/pg_json_ops.rb
#path_query_array(path, vars = nil, silent = nil) ⇒ Object
Returns a jsonb array of all values specified by the JSON path for the json object.
json_op.path_query_array("$.foo")
# jsonb_path_query_array(json, '$.foo')
json_op.path_query_array("$.foo ? ($ > $x)", x: 2)
# jsonb_path_query_array(json, '$.foo ? ($ > $x)', '{"x":2}')
json_op.path_query_array("$.foo ? ($ > $x)", {x: 2}, true)
# jsonb_path_query_array(json, '$.foo ? ($ > $x)', '{"x":2}', true)
747 748 749 |
# File 'lib/sequel/extensions/pg_json_ops.rb', line 747 def path_query_array(path, vars=nil, silent=nil) JSONBOp.new(_path_function(:jsonb_path_query_array, path, vars, silent)) end |