Class: ActiveRecord::Refined::AST::Bitwise
- Includes:
- Arithmetics, Predications
- Defined in:
- lib/active_record/refined/ast.rb
Overview
SQL's bitwise operations. Each parenthesises itself, which is what keeps the grouping the Ruby asked for: PostgreSQL gives & and | the same precedence and reads a | b & c from the left, where a.bitwise_or(b.bitwise_and(c)) means the other thing.
Instance Method Summary collapse
-
#initialize(left, operator, right) ⇒ Bitwise
constructor
A new instance of Bitwise.
Methods included from Arithmetics
#&, #*, #+, #-, #/, #<<, #>>, #^, #bitwise_and, #bitwise_not, #bitwise_or, #bitwise_xor, #|, #~
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(left, operator, right) ⇒ Bitwise
1619 1620 1621 1622 1623 |
# File 'lib/active_record/refined/ast.rb', line 1619 def initialize(left, operator, right) @left = left @operator = operator @right = check_operand(right) end |