code: def batch(self, queries):
          
          with self.connection() as cur:
              for sql, vars in queries:
  
                  if self.debug:
                      print(cur.mogrify(query, vars))
                  cur.execute(sql, vars)
docs: .. :py:method::
  
          :param tuple queries: [(sql, vars), (sql, vars), ...]
  
          .. note::
              batch execute queries.
              only support `insert` and `update`, have more efficiency