Class: SQLTree::Node::LogicalNotExpression
- Inherits:
-
Expression
- Object
- Base
- Expression
- SQLTree::Node::LogicalNotExpression
- Defined in:
- lib/sql_tree/node/expression.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
Returns the value of attribute expression.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(expression) ⇒ LogicalNotExpression
constructor
A new instance of LogicalNotExpression.
- #to_sql ⇒ Object
Methods inherited from Expression
Methods inherited from Base
[], #inspect, #quote_str, #quote_var
Constructor Details
#initialize(expression) ⇒ LogicalNotExpression
Returns a new instance of LogicalNotExpression.
44 45 46 |
# File 'lib/sql_tree/node/expression.rb', line 44 def initialize(expression) @expression = expression end |
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
42 43 44 |
# File 'lib/sql_tree/node/expression.rb', line 42 def expression @expression end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
52 53 54 |
# File 'lib/sql_tree/node/expression.rb', line 52 def ==(other) other.kind_of?(self.class) && other.expression == self.expression end |
#to_sql ⇒ Object
48 49 50 |
# File 'lib/sql_tree/node/expression.rb', line 48 def to_sql "NOT(#{@expression.to_sql})" end |