code: def upsert_all(engine, table, data):
      
      update_all(engine, table, data, upsert=True)
docs: Update data by primary key columns. If not able to update, do insert.
  
      Example::
  
          # suppose in database we already have {"id": 1, "name": "Alice"}
          >>> data = [
          ...     {"id": 1, "name": "Bob"}, # this will be updated
          ...     {"id": 2, "name": "Cathy"}, # this will be added
          ... ]
          >>> upsert_all(engine, table_user, data)
          >>> engine.execute(select([table_user])).fetchall()
          [{"id": 1, "name": "Bob"}, {"id": 2, "name": "Cathy"}]
  
      **中文文档**
  
      批量更新文档. 如果该表格定义了Primary Key, 则用Primary Key约束where语句. 对于
      where语句无法找到的行, 自动进行批量bulk insert.