Class: Sequel::Postgres::JSONBHash
- Inherits:
-
JSONHashBase
- Object
- Hash
- JSONHashBase
- Sequel::Postgres::JSONBHash
- Defined in:
- lib/sequel/extensions/pg_json.rb,
lib/sequel/extensions/pg_json_ops.rb
Instance Method Summary collapse
-
#op ⇒ Object
Wrap the JSONBHash instance in an JSONBOp, allowing you to easily use the PostgreSQL jsonb functions and operators with literal jsonbs.
-
#sql_literal_append(ds, sql) ⇒ Object
Cast as jsonb.
Methods included from SQL::CastMethods
#cast, #cast_numeric, #cast_string
Methods included from SQL::AliasMethods
Methods inherited from Hash
#&, #case, #hstore, #pg_json, #pg_jsonb, #sql_expr, #sql_negate, #sql_or, #|, #~
Instance Method Details
#op ⇒ Object
Wrap the JSONBHash 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
126 127 128 129 |
# File 'lib/sequel/extensions/pg_json.rb', line 126 def sql_literal_append(ds, sql) super sql << CAST_JSONB end |