Class: Locomotive::RelationalAlgebra::QueryPlan
- Inherits:
-
Object
- Object
- Locomotive::RelationalAlgebra::QueryPlan
- Includes:
- XML
- Defined in:
- lib/locomotive/relational_algebra/query_information.rb
Instance Attribute Summary collapse
-
#colref ⇒ Object
readonly
Returns the value of attribute colref.
-
#cols ⇒ Object
readonly
Returns the value of attribute cols.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#idref ⇒ Object
readonly
Returns the value of attribute idref.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#result_type ⇒ Object
readonly
Returns the value of attribute result_type.
Instance Method Summary collapse
-
#initialize(plan, cols, id, result_type = nil, idref = nil, colref = nil) ⇒ QueryPlan
constructor
A new instance of QueryPlan.
- #to_xml ⇒ Object
Methods included from XML
Constructor Details
#initialize(plan, cols, id, result_type = nil, idref = nil, colref = nil) ⇒ QueryPlan
Returns a new instance of QueryPlan.
563 564 565 566 567 568 569 570 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 563 def initialize(plan, cols, id, result_type=nil, idref=nil, colref=nil) @id = id @idref = idref @colref = colref @result_type = result_type @plan = plan @cols = cols end |
Instance Attribute Details
#colref ⇒ Object (readonly)
Returns the value of attribute colref.
556 557 558 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 556 def colref @colref end |
#cols ⇒ Object (readonly)
Returns the value of attribute cols.
556 557 558 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 556 def cols @cols end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
556 557 558 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 556 def id @id end |
#idref ⇒ Object (readonly)
Returns the value of attribute idref.
556 557 558 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 556 def idref @idref end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
556 557 558 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 556 def plan @plan end |
#result_type ⇒ Object (readonly)
Returns the value of attribute result_type.
556 557 558 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 556 def result_type @result_type end |
Instance Method Details
#to_xml ⇒ Object
572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 572 def to_xml attributes = { :id => id } attributes.merge!({ :idref => idref }) if idref attributes.merge!({ :colref => colref }) if colref query_plan(attributes) do p = [] p << properties do property(:name => :overallResultType, :value => result_type.to_xml) end if result_type p << plan.serialize p.join end end |