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.
195 196 197 198 |
# File 'lib/cequel/schema/column.rb', line 195 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.
189 190 191 |
# File 'lib/cequel/schema/column.rb', line 189 def index_name @index_name end |
Instance Method Details
#indexed? ⇒ Boolean
Returns true if this column has a secondary index.
203 204 205 |
# File 'lib/cequel/schema/column.rb', line 203 def indexed? !!@index_name end |