Class: SqlTools::CommonTableExpression
- Inherits:
-
Object
- Object
- SqlTools::CommonTableExpression
- Defined in:
- lib/sql_tools/common_table_expression.rb
Instance Attribute Summary collapse
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node) ⇒ CommonTableExpression
constructor
A new instance of CommonTableExpression.
- #inspect ⇒ Object
- #name ⇒ Object
- #view ⇒ Object
Constructor Details
#initialize(node) ⇒ CommonTableExpression
Returns a new instance of CommonTableExpression.
5 6 7 |
# File 'lib/sql_tools/common_table_expression.rb', line 5 def initialize(node) @node = node end |
Instance Attribute Details
#node ⇒ Object (readonly)
Returns the value of attribute node.
3 4 5 |
# File 'lib/sql_tools/common_table_expression.rb', line 3 def node @node end |
Instance Method Details
#inspect ⇒ Object
15 |
# File 'lib/sql_tools/common_table_expression.rb', line 15 def inspect = "#<class CommonTableExpression name=#{name.inspect}>" |
#name ⇒ Object
9 |
# File 'lib/sql_tools/common_table_expression.rb', line 9 def name = node.children.first.text.delete('`') |
#view ⇒ Object
11 12 13 |
# File 'lib/sql_tools/common_table_expression.rb', line 11 def view @view ||= ViewVisitor.new(node.children[-2]).visit.view end |