class Sequel::Postgres::JSONArray

  1. lib/sequel/extensions/pg_json.rb
Parent: Postgres

Class representating PostgreSQL JSON column array values.

Methods

Public Instance

  1. sql_literal_append

Included modules

  1. Sequel::SQL::AliasMethods

Public Instance methods

sql_literal_append (ds, sql)

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

[show source]
# File lib/sequel/extensions/pg_json.rb, line 72
def sql_literal_append(ds, sql)
  ds.literal_append(sql, to_json)
  sql << CAST_JSON
end