Method: Sequel::Postgres::JSONBaseOp#to_record

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

#to_recordObject

Builds arbitrary record from json object. You need to define the structure of the record using #as on the resulting object:

json_op.to_record.as(:x, [Sequel.lit('a integer'), Sequel.lit('b text')]) # json_to_record(json) AS x(a integer, b text)

460
461
462
# File 'lib/sequel/extensions/pg_json_ops.rb', line 460

def to_record
  function(:to_record)
end