Closed chejimmy closed 1 month ago
LGTM.
Just need to fix the
yarn spellcheck
by fixing the typoPagainating
insrc/SiteWiseQueryPaginator.test.ts
. Alsoddced
in thenextToken
is being picked up as an unknown word by the spellcheck. You can replace that substring in the token with some random characters to make it pass the spellcheck.
🙏 TY for the review; updated for spellcheck 👍
What this PR does / why we need it:
src/requestLooper.ts
has a confusing call logic where it keeps creating new Observable to subscribe to in order to paginate exhaustivelysrc/requestLooper.ts
attempted to generalize the logic by accepting 4 callbacks; it creates a fragmented logic between caller and requestLooper, hence, making the logic flow harder to followpaginateQuery
paginate in a more traditiondo...while...
loop to handle asynchronous iteration; this is achievable after turning thesuper.query(...)
intoPromise
; it is ok to do so since the SiteWise Query is not streaming and not necessary to apply the Observable pattern;src/SiteWiseQueryPaginator.ts
(see methodpaginateQuery
); append frame data and getting next queries in the same methodWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
src/getNextQueries.ts
is copied fromsrc/DataSource.ts