The product's identity key (shared by base and variants).
All matching series (order unspecified), or [] when none.
const series = await getPriceSeriesByProduct("3f9c2a…");
// => [ base series, variant series, … ]
export async function getPriceSeriesByProduct(productKey: string): Promise<PriceHistoryEntry[]> {
try {
const db = await getDB();
return await db.getAllFromIndex(IDB_STORE.PRICE_HISTORY, 'productKey', productKey);
} catch (error) {
logger.error('Failed to get price series by product from IndexedDB', { error });
return [];
}
}
Read every price-history series belonging to a product — its base row plus one row per tracked variant — via the
productKeyindex. Used by the detail panel to render a product's full price history in one query. Returns[]when the product has no recorded history or the read fails.