async update(id, data) {
    const { acl, tags, createdAt, updatedAt, ...query } = data;

    await this.sequelizeDb.sequelize.transaction(async (transaction) => {
      // If tags array provided sync tags
      if (Array.isArray(tags)) {
        const tagData = tags
          .filter((tag) => {
            return typeof tag === 'string' && tag.trim() !== '';
          })
          .map((tag) => {
            return { queryId: id, tag: tag.trim() };
          });
        await this.sequelizeDb.QueryTags.destroy({
          transaction,
          where: { queryId: id },
        });
        await this.sequelizeDb.QueryTags.bulkCreate(tagData, { transaction });
      }

      // If acl array provided sync ACL entries
      if (Array.isArray(acl)) {
        await this.sequelizeDb.QueryAcl.destroy({
          transaction,
          where: { queryId: id },
        });

        const aclRows = acl.map((row) => {
          return {
            queryId: id,
            userId: row.userId,
            userEmail: row.userEmail,
            groupId: row.groupId,
            write: row.write,
          };
        });
        await this.sequelizeDb.QueryAcl.bulkCreate(aclRows, { transaction });
      }

      const update = { ...query };
      delete update.id;
      await this.sequelizeDb.Queries.update(update, {
        transaction,
        where: { id },
      });
    });

    return this.findOneById(id);
  }
Save query object
returns saved query object
@param {string} id
@param {object} data - query object with tags, acl