Class: SQLTree::Token::Value
- Inherits:
-
SQLTree::Token
- Object
- SQLTree::Token
- SQLTree::Token::Value
- Defined in:
- lib/sql_tree/token.rb
Overview
The SQLTree::Token::Value class is the base class for every dynamic token. A dynamic token is a token for which the literal value used remains impoirtant during parsing.
Constant Summary
Constants inherited from SQLTree::Token
ARITHMETHIC_OPERATORS_HASH, COMMA, COMPARISON_OPERATORS, COMPARISON_OPERATORS_HASH, DOT, KEYWORDS, KEYWORD_COMBINATIONS, LPAREN, OPERATORS_HASH, RPAREN
Instance Attribute Summary
Attributes inherited from SQLTree::Token
Instance Method Summary collapse
-
#==(other) ⇒ Object
Compares two tokens.
-
#inspect ⇒ Object
:nodoc:.
Methods inherited from SQLTree::Token
#direction?, #initialize, #join?
Constructor Details
This class inherits a constructor from SQLTree::Token
Instance Method Details
#==(other) ⇒ Object
Compares two tokens. For values, the literal encountered value of the token is also taken into account besides the class.
58 59 60 |
# File 'lib/sql_tree/token.rb', line 58 def ==(other) other.class == self.class && @literal == other.literal end |
#inspect ⇒ Object
:nodoc:
52 53 54 |
# File 'lib/sql_tree/token.rb', line 52 def inspect # :nodoc: "#<#{self.class.name.split('::').last}:#{literal.inspect}>" end |