Class: Sequel::Postgres::JSONBArray

Inherits:
JSONArrayBase show all
Defined in:
lib/sequel/extensions/pg_json.rb,
lib/sequel/extensions/pg_json_ops.rb

Instance Method Summary collapse

Methods included from SQL::CastMethods

#cast, #cast_numeric, #cast_string

Methods included from SQL::AliasMethods

#as

Methods inherited from Array

#case, #pg_array, #pg_json, #pg_jsonb, #pg_row, #sql_expr, #sql_negate, #sql_or, #sql_string_join, #sql_value_list, #~

Instance Method Details

#opObject

Wrap the JSONBArray instance in an JSONBOp, allowing you to easily use the PostgreSQL jsonb functions and operators with literal jsonbs.



382
383
384
# File 'lib/sequel/extensions/pg_json_ops.rb', line 382

def op
  JSONBOp.new(self)
end

#sql_literal_append(ds, sql) ⇒ Object

Cast as jsonb



95
96
97
98
# File 'lib/sequel/extensions/pg_json.rb', line 95

def sql_literal_append(ds, sql)
  super
  sql << CAST_JSONB
end