original_docstring: Execute the given operation multiple times
  
          The executemany() method will execute the operation iterating
          over the list of parameters in seq_params.
  
          Example: Inserting 3 new employees and their phone number
  
          data = [
              ('Jane','555-001'),
              ('Joe', '555-001'),
              ('John', '555-003')
              ]
          stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s)"
          cursor.executemany(stmt, data)
  
          INSERT statements are optimized by batching the data, that is
          using the MySQL multiple rows syntax.
  
          Results are discarded. If they are needed, consider looping over
          data using the execute() method.
          
docstring: Execute the given operation multiple times
  The executemany() method will execute the operation iterating
  over the list of parameters in seq_params.
  
  Inserting 3 new employees and their phone number
  
  
  
  INSERT statements are optimized by batching the data, that is
  using the MySQL multiple rows syntax.
  
  Results are discarded. If they are needed, consider looping over
  data using the execute() method.
docstring_tokens: Execute the given operation multiple times The executemany () method will execute the operation iterating over the list of parameters in seq_params . Inserting 3 new employees and their phone number INSERT statements are optimized by batching the data that is using the MySQL multiple rows syntax . Results are discarded . If they are needed consider looping over data using the execute () method .
code: def executemany(self, operation, seq_params):
          """Execute the given operation multiple times
  
          The executemany() method will execute the operation iterating
          over the list of parameters in seq_params.
  
          Example: Inserting 3 new employees and their phone number
  
          data = [
              ('Jane','555-001'),
              ('Joe', '555-001'),
              ('John', '555-003')
              ]
          stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s)"
          cursor.executemany(stmt, data)
  
          INSERT statements are optimized by batching the data, that is
          using the MySQL multiple rows syntax.
  
          Results are discarded. If they are needed, consider looping over
          data using the execute() method.
          """
          if not operation or not seq_params:
              return None
          self._connection.handle_unread_result()
  
          try:
              _ = iter(seq_params)
          except TypeError:
              raise errors.ProgrammingError(
                  "Parameters for query must be an Iterable.")
  
          # Optimize INSERTs by batching them
          if re.match(RE_SQL_INSERT_STMT, operation):
              if not seq_params:
                  self._rowcount = 0
                  return
              stmt = self._batch_insert(operation, seq_params)
              if stmt is not None:
                  return self.execute(stmt)
  
          rowcnt = 0
          try:
              for params in seq_params:
                  self.execute(operation, params)
                  if self.with_rows and self._have_unread_result():
                      self.fetchall()
                  rowcnt += self._rowcount
          except (ValueError, TypeError) as err:
              raise errors.InterfaceError(
                  "Failed executing the operation; {0}".format(err))
          except:
              # Raise whatever execute() raises
              raise
          self._rowcount = rowcnt
code_tokens: def executemany ( self , operation , seq_params ) : if not operation or not seq_params : return None self . _connection . handle_unread_result ( ) try : _ = iter ( seq_params ) except TypeError : raise errors . ProgrammingError ( "Parameters for query must be an Iterable." ) if re . match ( RE_SQL_INSERT_STMT , operation ) : if not seq_params : self . _rowcount = 0 return stmt = self . _batch_insert ( operation , seq_params ) if stmt is not None : return self . execute ( stmt ) rowcnt = 0 try : for params in seq_params : self . execute ( operation , params ) if self . with_rows and self . _have_unread_result ( ) : self . fetchall ( ) rowcnt += self . _rowcount except ( ValueError , TypeError ) as err : raise errors . InterfaceError ( "Failed executing the operation; {0}" . format ( err ) ) except : raise self . _rowcount = rowcnt
short_docstring: Execute the given operation multiple times
  The executemany() method will execute the operation iterating
  over the list of parameters in seq_params.
short_docstring_tokens: Execute the given operation multiple times The executemany () method will execute the operation iterating over the list of parameters in seq_params .
comment: """Execute the given operation multiple times
  
          The executemany() method will execute the operation iterating
          over the list of parameters in seq_params.
  
          Example: Inserting 3 new employees and their phone number
  
          data = [
              ('Jane','555-001'),
              ('Joe', '555-001'),
              ('John', '555-003')
              ]
          stmt = "INSERT INTO employees (name, phone) VALUES ('%s','%s)"
          cursor.executemany(stmt, data)
  
          INSERT statements are optimized by batching the data, that is
          using the MySQL multiple rows syntax.
  
          Results are discarded. If they are needed, consider looping over
          data using the execute() method.
          """$SEP$# Optimize INSERTs by batching them$SEP$# Raise whatever execute() raises