anthonyreilly / NetCoreForce

Salesforce REST API toolkit for .NET Standard and .NET Core
MIT License
111 stars 63 forks source link

[Async] Migrate Query<T> result from List<T> to IAsyncQueryable<T> #1

Closed srigaux closed 6 years ago

srigaux commented 6 years ago

Query iterates asynchronously through Batches to avoid pre-loading all of them before returning the first item.

All test succeeds, but I can't test on a real batched query (not enough data in my salesforce Sandbox)

anthonyreilly commented 6 years ago

Thanks for this, I've been wanting to add async batching, and I'll be able to test it against some large batches. I'll probably need to modify it a bit though to preserve backwards compatibility.

srigaux commented 6 years ago

I thought that as we go to version 2.0, we could break the compatibility.

anthonyreilly commented 6 years ago

For now I'm trying to minimize any breaking changes - the main reason I bumped to v2.0 was because I was dropping netstandard1.3 compatibility. I'm merging your changes in as a new function (calling it "QueryAsync") and leaving he existing interfaces for now. I've run some tests against large batches and everything looks good so far.