lib/travis/logs/helpers/database.rb
def prepare_statements
          @db[:logs].where(id: :$log_id).prepare(:select, :find_log)
          @db[:logs].select(:id).where(job_id: :$job_id).prepare(:select, :find_log_id)
          @db[:logs].prepare(:insert, :create_log, {
            job_id: :$job_id,
            created_at: :$created_at,
            updated_at: :$updated_at,
          })
          @db[:log_parts].prepare(:insert, :create_log_part, {
            log_id: :$log_id,
            content: :$content,
            number: :$number,
            final: :$final,
            created_at: :$created_at,
          })
          @db[:log_parts].where(log_id: :$log_id).prepare(:delete, :delete_log_parts)
        end
# This method should only be called for "maintenance" tasks (such as
# creating the tables or debugging).
This method should only be called for "maintenance" tasks (such as
creating the tables or debugging).
This method should only be called for " maintenance " tasks ( such as creating the tables or debugging ) .
def prepare_statements
          @db[:logs].where(id: :$log_id).prepare(:select, :find_log)
          @db[:logs].select(:id).where(job_id: :$job_id).prepare(:select, :find_log_id)
          @db[:logs].prepare(:insert, :create_log, {
            job_id: :$job_id,
            created_at: :$created_at,
            updated_at: :$updated_at,
          })
          @db[:log_parts].prepare(:insert, :create_log_part, {
            log_id: :$log_id,
            content: :$content,
            number: :$number,
            final: :$final,
            created_at: :$created_at,
          })
          @db[:log_parts].where(log_id: :$log_id).prepare(:delete, :delete_log_parts)
        end
def prepare_statements @db [ :logs ] . where ( id : :$log_id ) . prepare ( :select , :find_log ) @db [ :logs ] . select ( :id ) . where ( job_id : :$job_id ) . prepare ( :select , :find_log_id ) @db [ :logs ] . prepare ( :insert , :create_log , { job_id : :$job_id , created_at : :$created_at , updated_at : :$updated_at , } ) @db [ :log_parts ] . prepare ( :insert , :create_log_part , { log_id : :$log_id , content : :$content , number : :$number , final : :$final , created_at : :$created_at , } ) @db [ :log_parts ] . where ( log_id : :$log_id ) . prepare ( :delete , :delete_log_parts ) end
This method should only be called for "maintenance" tasks (such as
creating the tables or debugging).
This method should only be called for " maintenance " tasks ( such as creating the tables or debugging ) .