ChemPal Documentation - v1.6.0
    Preparing search index...

    Function getAllPriceSeries

    • Read every stored price-history series (all base rows and variant rows across every product). The app reads per-product via getPriceSeriesByProduct; this full-store read backs dev/debug tooling that needs the whole set.

      Returns Promise<PriceHistoryEntry[]>

      All price-history series, or [] when none / on error.

      const all = await getAllPriceSeries();
      all.length; // total number of tracked series
      export async function getAllPriceSeries(): Promise<PriceHistoryEntry[]> {
      try {
      const db = await getDB();
      return await db.getAll(IDB_STORE.PRICE_HISTORY);
      } catch (error) {
      logger.error('Failed to get all price series from IndexedDB', { error });
      return [];
      }
      }