FgForrest / evitaDB

evitaDB is a specialized database with an easy-to-use API for e-commerce systems. It is a low-latency NoSQL in-memory engine that handles all the complex tasks that e-commerce systems have to deal with on a daily basis. evitaDB is expected to act as a fast secondary lookup/search index used by front stores.
https://evitadb.io
Other
62 stars 7 forks source link

Provide access to the price for sale calculation context #635

Closed novoj closed 3 months ago

novoj commented 3 months ago

When the io.evitadb.api.requestResponse.data.PricesContract#getPriceForSale() method is called, internal context is used for calculation. This context is derived from the actual query that was used when the entity was retrieved. There is also a method io.evitadb.api.requestResponse.data.PricesContract#isPriceForSaleContextAvailable which indicates that something like PriceForSaleContext is kept internally. This context cannot be accessed externally.

There are scenarios where accessing this "hidden" context might be beneficial - either for debugging purposes, or for lazy calculation of accompanying prices that should be based on the currency/validity moment that was used when the price for sale was calculated. This release aims to make this internal context available to the outside world.