Class: Qdsl::SelectQuery
- Inherits:
-
Object
- Object
- Qdsl::SelectQuery
- Defined in:
- lib/select.rb
Instance Attribute Summary collapse
-
#column_names ⇒ Object
readonly
Returns the value of attribute column_names.
Instance Method Summary collapse
-
#initialize(select, column_names) ⇒ SelectQuery
constructor
A new instance of SelectQuery.
- #render(context, depth, id) ⇒ Object
Constructor Details
#initialize(select, column_names) ⇒ SelectQuery
Returns a new instance of SelectQuery.
5 6 7 8 |
# File 'lib/select.rb', line 5 def initialize(select, column_names) @select = select @column_names = column_names end |
Instance Attribute Details
#column_names ⇒ Object (readonly)
Returns the value of attribute column_names.
3 4 5 |
# File 'lib/select.rb', line 3 def column_names @column_names end |
Instance Method Details
#render(context, depth, id) ⇒ Object
10 11 12 13 |
# File 'lib/select.rb', line 10 def render(context, depth, id) select_result = @select.render(context, depth) "(\n#{select_result}) AS #{id}" end |