11import DataLoader from 'dataloader' ;
22import invariant from 'invariant' ;
33
4- import {
5- EntityDatabaseAdapter ,
6- FieldEqualityCondition ,
7- QuerySelectionModifiers ,
8- QuerySelectionModifiersWithOrderByRaw ,
9- } from '../EntityDatabaseAdapter' ;
4+ import { EntityDatabaseAdapter } from '../EntityDatabaseAdapter' ;
105import {
116 EntityQueryContext ,
127 EntityTransactionalQueryContext ,
@@ -16,10 +11,7 @@ import { EntityQueryContextProvider } from '../EntityQueryContextProvider';
1611import { partitionErrors } from '../entityUtils' ;
1712import { IEntityLoadKey , IEntityLoadValue , LoadPair } from './EntityLoadInterfaces' ;
1813import { ReadThroughEntityCache } from './ReadThroughEntityCache' ;
19- import {
20- timeAndLogLoadEventAsync ,
21- timeAndLogLoadMapEventAsync ,
22- } from '../metrics/EntityMetricsUtils' ;
14+ import { timeAndLogLoadMapEventAsync } from '../metrics/EntityMetricsUtils' ;
2315import {
2416 EntityMetricsLoadType ,
2517 IEntityMetricsAdapter ,
@@ -251,64 +243,6 @@ export class EntityDataManager<
251243 return mapToReturn ;
252244 }
253245
254- /**
255- * Loads many objects matching the conjunction of where clauses constructed from
256- * specified field equality operands.
257- *
258- * @param queryContext - query context in which to perform the load
259- * @param fieldEqualityOperands - list of field equality where clause operand specifications
260- * @param querySelectionModifiers - limit, offset, and orderBy for the query
261- * @returns array of objects matching the query
262- */
263- async loadManyByFieldEqualityConjunctionAsync < N extends keyof TFields > (
264- queryContext : EntityQueryContext ,
265- fieldEqualityOperands : FieldEqualityCondition < TFields , N > [ ] ,
266- querySelectionModifiers : QuerySelectionModifiers < TFields > ,
267- ) : Promise < readonly Readonly < TFields > [ ] > {
268- return await timeAndLogLoadEventAsync (
269- this . metricsAdapter ,
270- EntityMetricsLoadType . LOAD_MANY_EQUALITY_CONJUNCTION ,
271- this . entityClassName ,
272- queryContext ,
273- ) (
274- this . databaseAdapter . fetchManyByFieldEqualityConjunctionAsync (
275- queryContext ,
276- fieldEqualityOperands ,
277- querySelectionModifiers ,
278- ) ,
279- ) ;
280- }
281-
282- /**
283- * Loads many objects matching the raw WHERE clause.
284- *
285- * @param queryContext - query context in which to perform the load
286- * @param rawWhereClause - parameterized SQL WHERE clause with positional binding placeholders or named binding placeholders
287- * @param bindings - array of positional bindings or object of named bindings
288- * @param querySelectionModifiers - limit, offset, orderBy, and orderByRaw for the query
289- * @returns array of objects matching the query
290- */
291- async loadManyByRawWhereClauseAsync (
292- queryContext : EntityQueryContext ,
293- rawWhereClause : string ,
294- bindings : any [ ] | object ,
295- querySelectionModifiers : QuerySelectionModifiersWithOrderByRaw < TFields > ,
296- ) : Promise < readonly Readonly < TFields > [ ] > {
297- return await timeAndLogLoadEventAsync (
298- this . metricsAdapter ,
299- EntityMetricsLoadType . LOAD_MANY_RAW ,
300- this . entityClassName ,
301- queryContext ,
302- ) (
303- this . databaseAdapter . fetchManyByRawWhereClauseAsync (
304- queryContext ,
305- rawWhereClause ,
306- bindings ,
307- querySelectionModifiers ,
308- ) ,
309- ) ;
310- }
311-
312246 private async invalidateOneAsync <
313247 TLoadKey extends IEntityLoadKey < TFields , TIDField , TSerializedLoadValue , TLoadValue > ,
314248 TSerializedLoadValue ,
0 commit comments