Class Sequel::Postgres::JSONArray
In: lib/sequel/extensions/pg_json.rb
lib/sequel/extensions/pg_json_ops.rb
Parent: DelegateClass(Array)

Class representating PostgreSQL JSON column array values.

Methods

Included Modules

Sequel::SQL::AliasMethods

Public Instance methods

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

[Source]

     # File lib/sequel/extensions/pg_json_ops.rb, line 210
210:         def op
211:           JSONOp.new(self)
212:         end

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

[Source]

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

[Validate]