Class: Hyperion::Mysql::DbStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/hyperion/mysql/db_strategy.rb

Instance Method Summary collapse

Instance Method Details

#process_count_result(result) ⇒ Object



15
16
17
# File 'lib/hyperion/mysql/db_strategy.rb', line 15

def process_count_result(result)
  result['COUNT(*)']
end

#process_result(given_record, result) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/hyperion/mysql/db_strategy.rb', line 7

def process_result(given_record, result)
  if Hyperion.new?(given_record)
    given_record.merge('id' => result.insert_id)
  else
    given_record
  end
end