runInsertQuery_(entry) {
    return new Promise((resolve, reject) => {
      this.db.serialize(() => {
        this.db.run(
          `INSERT INTO eventsdb
            (events, workspaceId, entryNumber) VALUES(?,?,?)`,
          [JSON.stringify(entry.events), entry.workspaceId, entry.entryNumber],
          (err) => {
            if (err) {
              console.error(err.message);
              reject('Failed to write to the database.');
            }
          },
        );
        this.db.each(
          `SELECT last_insert_rowid() as serverId;`,
          (err, lastServerId) => {
            if (err) {
              console.error(err.message);
              reject('Failed to retrieve serverId.');
            }
            resolve(lastServerId.serverId);
          },
        );
      });
    });
  }
Run query to add an entry to the database.
@param {!LocalEntry} entry The entry to be added to the database.
@returns {!Promise} Promise object with the serverId for the entry if the
write succeeded.
@private