Class: Cequel::Schema::DataColumn
- Defined in:
- lib/cequel/schema/column.rb
Overview
A scalar data column
Instance Attribute Summary collapse
-
#index_name ⇒ Symbol
readonly
Name of the secondary index applied to this column, if any.
Attributes inherited from Column
Instance Method Summary collapse
-
#indexed? ⇒ Boolean
True if this column has a secondary index.
-
#initialize(name, type, index_name = nil) ⇒ DataColumn
constructor
A new instance of DataColumn.
Methods inherited from Column
#==, #cast, #clustering_column?, #collection_column?, #data_column?, #inspect, #key?, #partition_key?, #to_cql, #to_s, #type?
Constructor Details
#initialize(name, type, index_name = nil) ⇒ DataColumn
Returns a new instance of DataColumn.
185 186 187 188 |
# File 'lib/cequel/schema/column.rb', line 185 def initialize(name, type, index_name = nil) super(name, type) @index_name = index_name end |
Instance Attribute Details
#index_name ⇒ Symbol (readonly)
Returns name of the secondary index applied to this column, if any.
179 180 181 |
# File 'lib/cequel/schema/column.rb', line 179 def index_name @index_name end |
Instance Method Details
#indexed? ⇒ Boolean
Returns true if this column has a secondary index.
193 194 195 |
# File 'lib/cequel/schema/column.rb', line 193 def indexed? !!@index_name end |