Class: Cequel::Record::DataSetBuilder Private
- Inherits:
-
Object
- Object
- Cequel::Record::DataSetBuilder
- Extended by:
- Forwardable
- Defined in:
- lib/cequel/record/data_set_builder.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This is a utility class to construct a Metal::DataSet for a given RecordSet.
Class Method Summary collapse
-
.build_for(record_set) ⇒ Metal::DataSet
private
Build a data set for the given record set.
Instance Method Summary collapse
-
#build ⇒ Metal::DataSet
private
A DataSet exposing the rows for the record set.
-
#initialize(record_set) ⇒ DataSetBuilder
constructor
private
A new instance of DataSetBuilder.
Constructor Details
#initialize(record_set) ⇒ DataSetBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DataSetBuilder.
27 28 29 30 |
# File 'lib/cequel/record/data_set_builder.rb', line 27 def initialize(record_set) @record_set = record_set @data_set = record_set.connection[record_set.target_class.table_name] end |
Class Method Details
.build_for(record_set) ⇒ Metal::DataSet
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build a data set for the given record set
19 20 21 |
# File 'lib/cequel/record/data_set_builder.rb', line 19 def self.build_for(record_set) new(record_set).build end |
Instance Method Details
#build ⇒ Metal::DataSet
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a DataSet exposing the rows for the record set.
36 37 38 39 40 41 42 43 44 |
# File 'lib/cequel/record/data_set_builder.rb', line 36 def build add_limit add_select_columns add_where_statement add_bounds add_order set_consistency data_set end |