Class: MassiveRecord::ORM::Persistence::Operations::AtomicOperation
- Inherits:
-
Object
- Object
- MassiveRecord::ORM::Persistence::Operations::AtomicOperation
- Defined in:
- lib/massive_record/orm/persistence/operations/atomic_operation.rb
Instance Attribute Summary
Attributes included from MassiveRecord::ORM::Persistence::Operations
Instance Method Summary collapse
Methods included from MassiveRecord::ORM::Persistence::Operations
atomic_operation, destroy, force, #initialize, insert, reload, suppress, suppressed?, update
Methods included from TableOperationHelpers
#attributes_to_row_values_hash, calculate_missing_family_names, #calculate_missing_family_names, #ensure_that_we_have_table_and_column_families!, hbase_create_table!, #hbase_create_table!, included, #row_for_record, #store_record_to_database
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/massive_record/orm/persistence/operations/atomic_operation.rb', line 10 def execute raise NotNumericalFieldError unless record.attributes_schema[attr_name].type == :integer ensure_that_we_have_table_and_column_families! ensure_proper_binary_integer_representation(attr_name) record[attr_name] = row_for_record.send("atomic_#{operation}", record.attributes_schema[attr_name].unique_name, by) ensure record.instance_variable_set(:@new_record, false) end |