async update(id, connection) {
    if (!connection) {
      throw new Error('connection required');
    }

    // Below uses destructing to deduce legacy driver fields
    // id is already declared in function, so it is being cloned and deleted here
    const clone = { ...connection };
    delete clone.id;

    const {
      name,
      description,
      driver,
      multiStatementTransactionEnabled,
      idleTimeoutSeconds,
      data,
      createdAt,
      updatedAt,
      ...legacyDriverFields
    } = clone;

    let updateObj = {
      id,
      name,
      description,
      driver,
      multiStatementTransactionEnabled,
      idleTimeoutSeconds,
    };

    // Old connections had driver-specific fields flat on connection object
    // With v5 those moved to data, but the old format needs to be supported
    // if data is supplied, we assume that this is a new format
    // if no data, then we assume all fields we don't know about are driver-specific fields
    if (data) {
      updateObj.data = data;
    } else {
      updateObj.data = legacyDriverFields;
    }

    updateObj = validateConnection(updateObj);

    // if data is set encrypt it
    if (updateObj.data) {
      updateObj.data = this.cryptr.encrypt(JSON.stringify(updateObj.data));
    }

    await this.sequelizeDb.Connections.update(updateObj, { where: { id } });
    return this.findOneById(id);
  }
@param {string} id - id of connection
@param {object} connection - connection object with .data field