From 154b295bd63e11042408e4e662d3cd4afba290fe Mon Sep 17 00:00:00 2001 From: Sugat Bajracharya Date: Wed, 31 Jul 2024 15:04:10 +0545 Subject: [PATCH] Fix conflict with target branch --- shared-libs/cht-datasource/src/person.ts | 33 ------------------------ 1 file changed, 33 deletions(-) diff --git a/shared-libs/cht-datasource/src/person.ts b/shared-libs/cht-datasource/src/person.ts index 29cac45eb2e..eb0253c5ab8 100644 --- a/shared-libs/cht-datasource/src/person.ts +++ b/shared-libs/cht-datasource/src/person.ts @@ -70,39 +70,6 @@ export namespace v1 { }; }; -<<<<<<< HEAD - // NOTE: there's probably a better name for this function - const getPeopleGenerator = () => (context: DataContext) => { - assertDataContext(context); - - /** - * Creates an iterator-like object for fetching batches of people data. - * @param personType - The type of person to fetch - * @throws throws an error if the provided personType is invalid. - * @returns An iterator-like object with a next method for fetching data. - */ - const curriedFn = async function* (personType: ContactTypeQualifier): AsyncGenerator { - assertTypeQualifier(personType); - const limit = 100; - let skip = 0; - - while (true) { - const docs = await context.bind(getPage)(personType, limit, skip); - - yield docs; - - if (docs.length < limit) { - break; - } - - skip += limit; - } - }; - return curriedFn; - }; - -======= ->>>>>>> b02973b26 (Address PR comments) /** * Returns a person for the given qualifier. * @param context the current data context