docs: function(doc, updates) {
        updates = this._in_map(updates || {});
  
        Object.keys(doc).forEach(function(prop) {
          if (updates.hasOwnProperty(prop)) {
            doc[prop] = updates[prop];
          }
        });
  
        if (!this.isValid(doc)) {
          throw new Error('Updated document is invalid');
        }
  
        var id = doc[this._dbType.id];
  
        this._uniq.forEach(function(uniq) {
          delete doc[uniq];
        });
  
        doc = this.clean(doc);
        return this._dbApi.update(id, doc);
      }