Class: CassandraModel::CounterRecord
- Defined in:
- lib/cassandra_model/counter_record.rb
Instance Attribute Summary
Attributes inherited from Record
#attributes, #execution_info, #valid
Attributes included from Scopes
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Record
#==, batch_type, before_save, before_save_callbacks, cassandra_columns, #clustering_columns, columns, composite_defaults, connection_name=, create, create_async, #delete, #delete_async, denormalized_column_map, first, first_async, #initialize, #inspect, #invalidate!, normalized_attributes, normalized_column, order_by_clause, #partition_key, #primary_key, query_for_delete, query_for_save, query_for_update, request, request_async, request_meta, restriction_attributes, #save, #save_async, select_column, select_columns, shard, shard_key, table, table=, table_name=, #update, #update_async
Methods included from Scopes
Methods included from QueryHelper
#after, #all, #before, def_query_helper, #find_by
Methods included from RecordDebug
Methods included from DisplayableAttributes
Methods included from MetaColumns
Constructor Details
This class inherits a constructor from CassandraModel::Record
Class Method Details
.counter_columns ⇒ Object
59 60 61 |
# File 'lib/cassandra_model/counter_record.rb', line 59 def counter_columns table_data.counter_columns ||= columns - (partition_key + clustering_columns) end |
.save_in_batch ⇒ Object
63 64 65 |
# File 'lib/cassandra_model/counter_record.rb', line 63 def save_in_batch table_config.batch_type = :counter end |
Instance Method Details
#increment!(options) ⇒ Object
8 9 10 |
# File 'lib/cassandra_model/counter_record.rb', line 8 def increment!() increment_async!().get end |
#increment_async!(options) ⇒ Object
4 5 6 |
# File 'lib/cassandra_model/counter_record.rb', line 4 def increment_async!() internal_increment_async!() end |