Method: Sequel::Postgres::JSONBaseOp#extract_text

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

#extract_text(*a) ⇒ Object

Returns a text value for the object at the given path.

json_op.extract_text('a') # json_extract_path_text(json, 'a')
json_op.extract_text('a', 'b') # json_extract_path_text(json, 'a', 'b')
[View source]

291
292
293
# File 'lib/sequel/extensions/pg_json_ops.rb', line 291

def extract_text(*a)
  Sequel::SQL::StringExpression.new(:NOOP, function(:extract_path_text, *a))
end