Class: Safrano::Filter::UnopTree
- Defined in:
- lib/odata/filter/base.rb,
lib/odata/filter/tree.rb,
lib/odata/filter/sequel.rb
Overview
unary op eg. NOT
Instance Attribute Summary
Attributes inherited from Tree
Attributes inherited from RootTree
Attributes inherited from Node
Instance Method Summary collapse
- #edm_type ⇒ Object
-
#initialize(val) ⇒ UnopTree
constructor
A new instance of UnopTree.
- #leuqes(jh) ⇒ Object
-
#precedence ⇒ Object
reference: OData v4 par 5.1.1.9 Operator Precedence.
Methods inherited from RootTree
#==, #accept?, #apply_to_dataset, #attach, #check_types, #detach, #first_child_value, #sequel_expr, #update_state
Methods inherited from Node
Constructor Details
#initialize(val) ⇒ UnopTree
Returns a new instance of UnopTree.
206 207 208 |
# File 'lib/odata/filter/tree.rb', line 206 def initialize(val) super(val.downcase.to_sym) end |
Instance Method Details
#edm_type ⇒ Object
221 222 223 224 225 226 227 228 |
# File 'lib/odata/filter/tree.rb', line 221 def edm_type case @value when :not :bool else :any end end |
#leuqes(jh) ⇒ Object
147 148 149 150 151 152 153 154 |
# File 'lib/odata/filter/sequel.rb', line 147 def leuqes(jh) case @value when :not @children.first.leuqes(jh).map_result! { |l| Sequel.~(l) } else Safrano::FilterParseError end end |
#precedence ⇒ Object
reference: OData v4 par 5.1.1.9 Operator Precedence
212 213 214 215 216 217 218 219 |
# File 'lib/odata/filter/tree.rb', line 212 def precedence case @value when :not 7 else 999 end end |