original_docstring: Executes the given operation
  
          Executes the given operation substituting any markers with
          the given parameters.
  
          For example, getting all rows where id is 5:
            cursor.execute("SELECT * FROM t1 WHERE id = %s", (5,))
  
          The multi argument should be set to True when executing multiple
          statements in one operation. If not set and multiple results are
          found, an InterfaceError will be raised.
  
          If warnings where generated, and connection.get_warnings is True, then
          self._warnings will be a list containing these warnings.
  
          Returns an iterator when multi is True, otherwise None.
          
docstring: Executes the given operation
  Executes the given operation substituting any markers with
  the given parameters.
  
  For example, getting all rows where id is 5:
  cursor.execute("SELECT * FROM t1 WHERE id = %s", (5,))
  
  The multi argument should be set to True when executing multiple
  statements in one operation. If not set and multiple results are
  found, an InterfaceError will be raised.
  
  If warnings where generated, and connection.get_warnings is True, then
  self._warnings will be a list containing these warnings.
  
  Returns an iterator when multi is True, otherwise None.
docstring_tokens: Executes the given operation Executes the given operation substituting any markers with the given parameters . For example getting all rows where id is 5 : cursor . execute ( " SELECT * FROM t1 WHERE id = %s " ( 5 )) The multi argument should be set to True when executing multiple statements in one operation . If not set and multiple results are found an InterfaceError will be raised . If warnings where generated and connection . get_warnings is True then self . _warnings will be a list containing these warnings . Returns an iterator when multi is True otherwise None .
code: def execute(self, operation, params=None, multi=False):
          """Executes the given operation
  
          Executes the given operation substituting any markers with
          the given parameters.
  
          For example, getting all rows where id is 5:
            cursor.execute("SELECT * FROM t1 WHERE id = %s", (5,))
  
          The multi argument should be set to True when executing multiple
          statements in one operation. If not set and multiple results are
          found, an InterfaceError will be raised.
  
          If warnings where generated, and connection.get_warnings is True, then
          self._warnings will be a list containing these warnings.
  
          Returns an iterator when multi is True, otherwise None.
          """
          if not operation:
              return None
  
          if not self._connection:
              raise errors.ProgrammingError("Cursor is not connected")
  
          self._connection.handle_unread_result()
  
          self._reset_result()
          stmt = ''
  
          try:
              if not isinstance(operation, (bytes, bytearray)):
                  stmt = operation.encode(self._connection.python_charset)
              else:
                  stmt = operation
          except (UnicodeDecodeError, UnicodeEncodeError) as err:
              raise errors.ProgrammingError(str(err))
  
          if params is not None:
              if isinstance(params, dict):
                  for key, value in self._process_params_dict(params).items():
                      stmt = stmt.replace(key, value)
              elif isinstance(params, (list, tuple)):
                  psub = _ParamSubstitutor(self._process_params(params))
                  stmt = RE_PY_PARAM.sub(psub, stmt)
                  if psub.remaining != 0:
                      raise errors.ProgrammingError(
                          "Not all parameters were used in the SQL statement")
  
          self._executed = stmt
          if multi:
              self._executed_list = []
              return self._execute_iter(self._connection.cmd_query_iter(stmt))
          else:
              try:
                  self._handle_result(self._connection.cmd_query(stmt))
              except errors.InterfaceError:
                  if self._connection._have_next_result:  # pylint: disable=W0212
                      raise errors.InterfaceError(
                          "Use multi=True when executing multiple statements")
                  raise
              return None
code_tokens: def execute ( self , operation , params = None , multi = False ) : if not operation : return None if not self . _connection : raise errors . ProgrammingError ( "Cursor is not connected" ) self . _connection . handle_unread_result ( ) self . _reset_result ( ) stmt = '' try : if not isinstance ( operation , ( bytes , bytearray ) ) : stmt = operation . encode ( self . _connection . python_charset ) else : stmt = operation except ( UnicodeDecodeError , UnicodeEncodeError ) as err : raise errors . ProgrammingError ( str ( err ) ) if params is not None : if isinstance ( params , dict ) : for key , value in self . _process_params_dict ( params ) . items ( ) : stmt = stmt . replace ( key , value ) elif isinstance ( params , ( list , tuple ) ) : psub = _ParamSubstitutor ( self . _process_params ( params ) ) stmt = RE_PY_PARAM . sub ( psub , stmt ) if psub . remaining != 0 : raise errors . ProgrammingError ( "Not all parameters were used in the SQL statement" ) self . _executed = stmt if multi : self . _executed_list = [ ] return self . _execute_iter ( self . _connection . cmd_query_iter ( stmt ) ) else : try : self . _handle_result ( self . _connection . cmd_query ( stmt ) ) except errors . InterfaceError : if self . _connection . _have_next_result : raise errors . InterfaceError ( "Use multi=True when executing multiple statements" ) raise return None
short_docstring: Executes the given operation
  Executes the given operation substituting any markers with
  the given parameters.
short_docstring_tokens: Executes the given operation Executes the given operation substituting any markers with the given parameters .
comment: """Executes the given operation
  
          Executes the given operation substituting any markers with
          the given parameters.
  
          For example, getting all rows where id is 5:
            cursor.execute("SELECT * FROM t1 WHERE id = %s", (5,))
  
          The multi argument should be set to True when executing multiple
          statements in one operation. If not set and multiple results are
          found, an InterfaceError will be raised.
  
          If warnings where generated, and connection.get_warnings is True, then
          self._warnings will be a list containing these warnings.
  
          Returns an iterator when multi is True, otherwise None.
          """$SEP$# pylint: disable=W0212