__generateUpdateQuery__(fields) {

    let query = this.__generateQuery__(['id'], true);
    let columns = Object.keys(fields);
    let params = columns.map(c => fields[c]);

    let columnNames = columns.filter((v, i) => typeof params[i] !== 'function');
    let columnFunctions = columns
      .filter((v, i) => typeof params[i] === 'function')
      .map((v, i) => [v, utilities.getFunctionParameters(params[i]), params[i]]);

    params = params.filter(v => typeof v !== 'function');

    query.sql = this.db.adapter.generateUpdateAllQuery(
      this.Model.table(),
      'id',
      columnNames,
      columnFunctions,
      query.params.length,
      query.sql
    );

    query.params = query.params.concat(params);

    return query;

  }
Generate a SQL update query
@param {Object} [fields] A list of field / value pairs to set
@return {Object} has "params" and "sql" properties
@private