rethink.go
func (s RethinkStore) BatchUpdate(ids []interface{}, data []interface{}, store string, opts ObjectStoreOptions) (err error) {

	_, err = r.DB(s.Database).Table(store).GetAll(ids...).Update(func(row r.Term) interface{} {
		lenArgs := len(ids) * 2
		args := make([]interface{}, lenArgs+1)
		for k, v := range ids {
			first := k * 2
			second := first + 1
			args[first] = row.Field("id").Eq(v.(string))
			args[second] = data[k]
		}
		args[lenArgs] = nil
		return r.Branch(args...)
	}, r.UpdateOpts{Durability: "hard"}).RunWrite(s.Session)
	// if res.Updated < len(ids) {
	// 	err = ErrNotAllDeleted
	// }
	return
}
func (s RethinkStore) BatchUpdate(ids []interface{}, data []interface{}, store string, opts ObjectStoreOptions) (err error) {

	_, err = r.DB(s.Database).Table(store).GetAll(ids...).Update(func(row r.Term) interface{} {
		lenArgs := len(ids) * 2
		args := make([]interface{}, lenArgs+1)
		for k, v := range ids {
			first := k * 2
			second := first + 1
			args[first] = row.Field("id").Eq(v.(string))
			args[second] = data[k]
		}
		args[lenArgs] = nil
		return r.Branch(args...)
	}, r.UpdateOpts{Durability: "hard"}).RunWrite(s.Session)
	// if res.Updated < len(ids) {
	// 	err = ErrNotAllDeleted
	// }
	return
}
//BatchUpdate updates multiple rows by id