Class: Locomotive::RelationalAlgebra::QueryPlanBundle
- Inherits:
-
Object
- Object
- Locomotive::RelationalAlgebra::QueryPlanBundle
- Includes:
- XML
- Defined in:
- lib/locomotive/relational_algebra/query_information.rb
Constant Summary collapse
- XML_Prolog =
'<?xml version="1.0" encoding="UTF-8"?>'+"\n"
Instance Attribute Summary collapse
-
#cs_structure ⇒ Object
readonly
Returns the value of attribute cs_structure.
-
#query_plans ⇒ Object
Returns the value of attribute query_plans.
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize(qin, type) ⇒ QueryPlanBundle
constructor
A new instance of QueryPlanBundle.
- #to_xml ⇒ Object
Methods included from XML
Constructor Details
#initialize(qin, type) ⇒ QueryPlanBundle
Returns a new instance of QueryPlanBundle.
635 636 637 638 639 640 641 642 643 644 645 646 647 648 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 635 def initialize(qin, type) plan = qin.plan cols = qin.column_structure side = qin.side_effects.plan surr = qin.surrogates ser = SerializeRelation.new( side, plan, Iter.new(1), Pos.new(1), cols.items) qp = QueryPlan.new(ser, cols, 0, type) self.query_plans = [qp, collect_surrogates(cols.items, 0, surr)].flatten end |
Instance Attribute Details
#cs_structure ⇒ Object (readonly)
Returns the value of attribute cs_structure.
633 634 635 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 633 def cs_structure @cs_structure end |
#query_plans ⇒ Object
Returns the value of attribute query_plans.
632 633 634 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 632 def query_plans @query_plans end |
Instance Method Details
#clone ⇒ Object
659 660 661 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 659 def clone QueryPlanBundle.new( logical_query_plans ) end |
#to_xml ⇒ Object
650 651 652 653 654 655 656 657 |
# File 'lib/locomotive/relational_algebra/query_information.rb', line 650 def to_xml XML_Prolog + query_plan_bundle do query_plans.map do |qp| qp.to_xml end.join end end |