Class: ActiveRecord::Refined::AST::JsonHasKey
- Defined in:
- lib/active_record/refined/ast.rb
Overview
Whether a key is in the document. PostgreSQL's spelling is the ? operator rather than jsonb_exists, the function it is shorthand for, because a GIN index matches the operator and never the function. A ? is a bind placeholder only to sanitize_sql, which none of the SQL written here passes through.
Instance Method Summary collapse
-
#initialize(operand, key) ⇒ JsonHasKey
constructor
A new instance of JsonHasKey.
Methods included from Connectives
Methods inherited from Node
Constructor Details
#initialize(operand, key) ⇒ JsonHasKey
Returns a new instance of JsonHasKey.
1294 1295 1296 1297 |
# File 'lib/active_record/refined/ast.rb', line 1294 def initialize(operand, key) @operand = operand @key = key end |