addOperation = async (op) => {
    const task = async () => {
      const entry = await log.append(op, { referencesCount })
      await sync.add(entry)
      if (onUpdate) {
        await onUpdate(log, entry)
      }
      events.emit('update', entry)
      return entry.hash
    }
    const hash = await queue.add(task)
    return hash
  }
Adds an operation to the oplog.
@function addOperation
@param {*} op Some operation to add to the oplog.
@return {string} The hash of the operation.
@memberof module:Databases~Database
@instance
@async