Parent

Included Modules

Class/Module Index [+]

Quicksearch

Sequel::Postgres::JSONHash

Class representating PostgreSQL JSON column hash/object values.

Public Instance Methods

op() click to toggle source

Wrap the JSONHash instance in an JSONOp, allowing you to easily use the PostgreSQL json functions and operators with literal jsons.

# File lib/sequel/extensions/pg_json_ops.rb, line 218
def op
  JSONOp.new(self)
end
sql_literal_append(ds, sql) click to toggle source

Convert the hash to a json string, append a literalized version of the string to the sql, and explicitly cast the string to json.

# File lib/sequel/extensions/pg_json.rb, line 88
def sql_literal_append(ds, sql)
  ds.literal_append(sql, Sequel.object_to_json(self))
  sql << CAST_JSON
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.