def _executemany ( self , cursor , query , parameters ) : try : self . _log ( query ) cursor . executemany ( query , parameters ) except OperationalError as e : # pragma: no cover logging . error ( 'Error connecting to PostgreSQL on %s, e' , self . host , e ) self . close ( ) raise
no of records updated from executemany python
The function is mostly useful for commands that update the database : any result set returned by the query is discarded .
def _executemany(self, cursor, query, parameters):
        """The function is mostly useful for commands that update the database:
           any result set returned by the query is discarded."""
        try:
            self._log(query)
            cursor.executemany(query, parameters)
        except OperationalError as e:  # pragma: no cover
            logging.error('Error connecting to PostgreSQL on %s, e', self.host, e)
            self.close()
            raise