Module: Voltdb::VoltTableUtils
- Defined in:
- lib/voltdb/volt_table_utils.rb
Class Method Summary collapse
-
.map_first_row_from_volt_table(volt_table) {|VoltTableRow| ... } ⇒ Object?
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over the first row of a VoltTableRow while also adding VoltTableRow Ruby Utils.
-
.map_volt_table(volt_table) {|VoltTableRow| ... } ⇒ Array<Object, Object>
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over a VoltTableRow while also adding VoltTableRow Ruby Utils.
Instance Method Summary collapse
-
#map {|VoltTableRow| ... } ⇒ Array<Object, Object>
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over a VoltTableRow while also adding VoltTableRow Ruby Utils.
-
#map_first_row {|VoltTableRow| ... } ⇒ Object?
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over the first row of a VoltTableRow while also adding VoltTableRow Ruby Utils.
Class Method Details
.map_first_row_from_volt_table(volt_table) {|VoltTableRow| ... } ⇒ Object?
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over the first row of a VoltTableRow while also adding VoltTableRow Ruby Utils
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/voltdb/volt_table_utils.rb', line 37 def self.map_first_row_from_volt_table(volt_table, &block) volt_table.reset_row_position volt_table.extend(VoltTableRowUtils) if(volt_table.advance_row) block.call(volt_table) else nil end end |
.map_volt_table(volt_table) {|VoltTableRow| ... } ⇒ Array<Object, Object>
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over a VoltTableRow while also adding VoltTableRow Ruby Utils
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/voltdb/volt_table_utils.rb', line 17 def self.map_volt_table(volt_table, &block) results = [] volt_table.reset_row_position volt_table.extend(VoltTableRowUtils) while(volt_table.advance_row) do results << block.call(volt_table) end results end |
Instance Method Details
#map {|VoltTableRow| ... } ⇒ Array<Object, Object>
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over a VoltTableRow while also adding VoltTableRow Ruby Utils
54 55 56 |
# File 'lib/voltdb/volt_table_utils.rb', line 54 def map VoltTableUtils.map_volt_table(self, &block) end |
#map_first_row {|VoltTableRow| ... } ⇒ Object?
This method is used when we extend the VoltDB VoltTable interface and it’s used to iterate over the first row of a VoltTableRow while also adding VoltTableRow Ruby Utils
64 65 66 |
# File 'lib/voltdb/volt_table_utils.rb', line 64 def map_first_row VoltTableUtils.map_first_row_from_volt_table(self, &block) end |