Class: Cql::Model::Query::ComparisonExpression
- Inherits:
-
Expression
- Object
- Expression
- Cql::Model::Query::ComparisonExpression
- Defined in:
- lib/cql/model/query/comparison_expression.rb
Constant Summary collapse
- OPERATORS =
Operators allowed in a where-clause lambda
{ :== => '=', :'!=' => '!=', :'>' => '>', :'<' => '<', :'>=' => '>=', :'<=' => '<=', :'in' => 'IN', }.freeze
- TYPECASTS =
Methods used to escape CQL column names that aren’t valid CQL identifiers
[ :ascii, :bigint, :blob, :boolean, :counter, :decimal, :double, :float, :int, :text, :timestamp, :uuid, :timeuuid, :varchar, :varint ].freeze
Instance Method Summary collapse
-
#initialize(*params, &block) ⇒ ComparisonExpression
constructor
A new instance of ComparisonExpression.
- #inspect ⇒ Object
- #method_missing(token, *args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(*params, &block) ⇒ ComparisonExpression
Returns a new instance of ComparisonExpression.
37 38 39 40 41 42 43 |
# File 'lib/cql/model/query/comparison_expression.rb', line 37 def initialize(*params, &block) @left = nil @operator = nil @right = nil instance_exec(*params, &block) if block end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(token, *args) ⇒ Object
70 71 72 |
# File 'lib/cql/model/query/comparison_expression.rb', line 70 def method_missing(token, *args) __apply__(token, args) end |
Instance Method Details
#inspect ⇒ Object
51 52 53 |
# File 'lib/cql/model/query/comparison_expression.rb', line 51 def inspect __build__ end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/cql/model/query/comparison_expression.rb', line 46 def to_s __build__ end |