Browse Source

Optimize query in getRange()

feature/optimize-get-range-query-in-market-data-service
Thomas Kaul 3 days ago
parent
commit
96c7465f12
  1. 16
      apps/api/src/services/market-data/market-data.service.ts

16
apps/api/src/services/market-data/market-data.service.ts

@ -75,17 +75,13 @@ export class MarketDataService {
}
],
where: {
dataSource: {
in: assetProfileIdentifiers.map(({ dataSource }) => {
return dataSource;
})
},
date: dateQuery,
symbol: {
in: assetProfileIdentifiers.map(({ symbol }) => {
return symbol;
})
}
OR: assetProfileIdentifiers.map(({ dataSource, symbol }) => {
return {
dataSource,
symbol
};
})
}
});
}

Loading…
Cancel
Save