Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add an AsyncSeq overload for ScanAsync #14

Open
NatElkins opened this issue Aug 21, 2018 · 3 comments
Open

Feature Request: Add an AsyncSeq overload for ScanAsync #14

NatElkins opened this issue Aug 21, 2018 · 3 comments

Comments

@NatElkins
Copy link

I have a use case where I may need to scan a table for millions of items. I am unable to allocate an array that large. What I really want is to be able to operate on it like a stream. Would you accept a PR adding an overload that returns an AsyncSeq instead of an array? It would require taking a dependency on https://github.com/fsprojects/FSharp.Control.AsyncSeq.

Thank you for all your hard work!

@AviAvni
Copy link
Contributor

AviAvni commented Aug 22, 2018

I think that getting millions of items need to be done with paging so why use AsyncSeq and not create function that get page size and callback function?

@samritchie
Copy link
Collaborator

I made a start on paging support a year or so ago but never finished. It seems a more flexible approach as you’d often want to paginate data via an API or a user interface. I can have another go at this if it seems useful?

You could certainly then wrap a paginated query in AsyncSeq (and I think this is worthwhile for admin-type scripts).

rtkelly13 added a commit to rtkelly13/FSharp.AWS.DynamoDB that referenced this issue Jan 12, 2019
@samritchie
Copy link
Collaborator

See @bartelink’s comment here: #16 (comment) - I think there’s value in implementing scans & queries using TaskSeq, it may need some thought around the API design. I wouldn’t be fundamentally opposed to returning a TaskSeq as standard from all unbounded scans/queries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants