Skip to content

Conversation

@slaveeks
Copy link
Member

    /**
     * Compose options for find method
     * @type {{groupingTimestamp: {$gt: number}}}
     */
    const options = {
      groupingTimestamp: {
        $gt: since,
      },
    };

    /**
     * Add eq check if groupHash was passed
     */
    if (groupHash) {
      options.groupHash = {
        $eq: groupHash,
      };
    }

    let dailyEvents = await this.getCollection(this.TYPES.DAILY_EVENTS)
      .find(options)
      .toArray();

Added indexes to DailyEvents for queries to find ChartData

@slaveeks slaveeks requested review from e11sy and neSpecc October 10, 2025 19:31
@slaveeks slaveeks merged commit 366a7e7 into master Nov 4, 2025
6 checks passed
@slaveeks slaveeks deleted the feat/add-daily-events-indexes branch November 4, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants