func (p *provenanceQueryProcessor) GetMostRecentValueAtOrBelow(dbName, key string, version *types.Version) (*types.GetHistoricalDataResponse, error) {
	value, err := p.provenanceStore.GetMostRecentValueAtOrBelow(dbName, key, version)
	if err != nil {
		return nil, err
	}
	if value == nil {
		return p.composeHistoricalDataResponse(nil)
	}
	return p.composeHistoricalDataResponse([]*types.ValueWithMetadata{value})
}
GetMostRecentValueAtOrBelow returns the most recent value of a given key at or below the given version
package bcdb
import (
	"github.com/hyperledger-labs/orion-server/internal/provenance"
	"github.com/hyperledger-labs/orion-server/pkg/logger"
	"github.com/hyperledger-labs/orion-server/pkg/types"
)
type provenanceQueryProcessor struct {
	provenanceStore *provenance.Store
	logger          *logger.SugarLogger
}
type provenanceQueryProcessorConfig struct {
	provenanceStore *provenance.Store
	logger          *logger.SugarLogger
}
func newProvenanceQueryProcessor(conf *provenanceQueryProcessorConfig) *provenanceQueryProcessor {
	return &provenanceQueryProcessor{
		provenanceStore: conf.provenanceStore,
		logger:          conf.logger,
	}
}
func (p *provenanceQueryProcessor) GetValues(dbName, key string) (*types.GetHistoricalDataResponse, error) {
	values, err := p.provenanceStore.GetValues(dbName, key)
	if err != nil {
		return nil, err
	}
	return p.composeHistoricalDataResponse(values)
}
func (p *provenanceQueryProcessor) GetValueAt(dbName, key string, version *types.Version) (*types.GetHistoricalDataResponse, error) {
	value, err := p.provenanceStore.GetValueAt(dbName, key, version)
	if err != nil {
		return nil, err
	}
	if value == nil {
		return p.composeHistoricalDataResponse(nil)
	}
	return p.composeHistoricalDataResponse([]*types.ValueWithMetadata{value})
}