Class: ActiveRecord::Refined::AST::JsonSet
- Includes:
- JsonComparable, Predications
- Defined in:
- lib/active_record/refined/ast.rb
Overview
Setting a value inside a JSON document, which is what bury does to what dig reads. The document comes back changed rather than being written anywhere; update_all is what writes it.
Instance Method Summary collapse
-
#initialize(operand, path, value) ⇒ JsonSet
constructor
A new instance of JsonSet.
Methods included from JsonComparable
#between?, #bitwise_not, #in?, #not_between?, #not_in?, #~
Methods included from Predications
#!=, #!~, #<, #<=, #==, #=~, #>, #>=, #between?, #bury, #casecmp?, #contains?, #dig, #dig_text, #distinct_from?, #end_with?, #except, #false?, #ilike?, #in?, #include?, #intersect?, #key?, #keys, #like?, #member?, #not_between?, #not_distinct_from?, #not_false?, #not_ilike?, #not_in?, #not_like?, #not_null?, #not_true?, #null?, #start_with?, #subset?, #superset?, #true?, #when
Methods inherited from Node
Constructor Details
#initialize(operand, path, value) ⇒ JsonSet
Returns a new instance of JsonSet.
1191 1192 1193 1194 1195 |
# File 'lib/active_record/refined/ast.rb', line 1191 def initialize(operand, path, value) @operand = operand @path = check_steps(path, "bury") @value = value end |