app/strategies/passage_updater.rb
# Creates a new row given its parent mrr id and its other values.
# This method updates also the internal SQL diff log file.
#
# When specified, the MeetingIndividualResult instance (mir) parameter will take
# precedence over any other supplied meeting_program_id, swimmer_id & team_id.
# (These 3 must all be present in order to be used when the +mir+ parameter is +nil+)
#
# == Returns:
#
# The specified Passage instance (which will result created only when successful).
# nil only in case of errors.
#
Creates a new row given its parent mrr id and its other values.
This method updates also the internal SQL diff log file.

When specified, the MeetingIndividualResult instance (mir) parameter will take
precedence over any other supplied meeting_program_id, swimmer_id & team_id.
(These 3 must all be present in order to be used when the +mir+ parameter is +nil+)



The specified Passage instance (which will result created only when successful).
nil only in case of errors.
Creates a new row given its parent mrr id and its other values . This method updates also the internal SQL diff log file . When specified the MeetingIndividualResult instance ( mir ) parameter will take precedence over any other supplied meeting_program_id swimmer_id & team_id . ( These 3 must all be present in order to be used when the + mir + parameter is + nil + ) The specified Passage instance ( which will result created only when successful ) . nil only in case of errors .
def create_new_row!( mir, passage_type_id, timing_instance, reaction_time_instance = nil,
                       meeting_program_id = nil, swimmer_id = nil, team_id = nil )
    return nil unless passage_type_id && timing_instance
    passage = prepare_passage_fields( Passage.new, timing_instance, reaction_time_instance, mir, passage_type_id,
                                      meeting_program_id, swimmer_id, team_id )
    passage.save!
    sql_diff_text_log << to_sql_insert( passage, false, "\r\n" )
    passage
  end
def create_new_row! ( mir , passage_type_id , timing_instance , reaction_time_instance = nil , meeting_program_id = nil , swimmer_id = nil , team_id = nil ) return nil unless passage_type_id && timing_instance passage = prepare_passage_fields ( Passage . new , timing_instance , reaction_time_instance , mir , passage_type_id , meeting_program_id , swimmer_id , team_id ) passage . save! sql_diff_text_log << to_sql_insert ( passage , false , "\r\n" ) passage end
Creates a new row given its parent mrr id and its other values.
Creates a new row given its parent mrr id and its other values .
# Store Db-diff text for INSERT
mir
<not_specific>
passage_type_id
<not_specific>
timing_instance
<not_specific>
reaction_time_instance
<not_specific>
meeting_program_id
<not_specific>
swimmer_id
<not_specific>
team_id
<not_specific>