Closed stewart-r closed 8 years ago
Thanks again :-)
My pleasure. (literally! ;-))
@stewart-r just a small question regarding the above - I'm thinking of rewriting this bit recursively / with a fold but I'm unclear of the behaviour of the continuation token. Does it mutate the exist token (in which case does it really set it to null?) or should there be a "new" token passed out?
Oh no - that's a mistake.
getBatch
should returnbatch.ContinuationToken
- not the original contTkn
. It should have been:
let getBatch contTkn = async {
let! batch = (getTable tableName connection).ExecuteQuerySegmentedAsync(query,contTkn) |> Async.AwaitTask
batch
|> Seq.map(mapToReturnEntity)
|> resSet.AddRange
return batch.ContinuationToken
}
let! firstContTkn = getBatch null
let mutable contTkn = firstContTkn
while (contTkn <> null) do
let! nextTkn = getBatch contTkn
contTkn <- nextTkn
Sincere apologies, Isaac. I should have spotted this but, more importantly, I should have had this covered by a test. It never occurred to me that I didn't have a multi-batch test.
No worries :-) I'll push a fix out - code hasn't been released yet anyway.
Would you have time to write a multi-batch test though? :-)
Certainly - its the least I can do. :-)
I'm just starting work right now but will either do it at lunchtime or this evening
That's great - I've pushed the fix, so no rush on the test case. Thanks for your help here :-)
Fixes #35
I think I have now covered all the table members with async variants.
As always, just let me know if there is something I ought to amend or rethink.
Stewart