chore(docs): add basic samples for async data client#940
Conversation
| family_id = "stats_summary" | ||
|
|
||
| async with table.mutations_batcher( | ||
| flush_limit_mutation_count=2, flush_limit_bytes=1024 |
There was a problem hiding this comment.
should we add a comment here saying the default is 100 and is good for most use cases, setting it to 2 just for the example purpose?
Or we don't change the defaults here, and just manually flush in the end. And I would also add some comments on why manual flush is needed, something like "flush will be called automatically when a batch is full, the default batch size is 100".
There was a problem hiding this comment.
Ok, maybe I'll remove the arguments here if that's confusing. A manual flush isn't needed since we are using a async with statement, it will flush and close everything for us at the end of this block
Let me know if you think any extra comments are needed to clarify anything
| ) | ||
| batcher.append( | ||
| RowMutationEntry("tablet#a0b81f74#20190502", mutation_list) | ||
| ) |
There was a problem hiding this comment.
No, we're using a context manager (async with), so it will automatically call close for us at the end of the block
This reverts commit 08f6de7.
This PR adds
*_async_*to the region tagCurrently missing are the samples on the Use filters and Deletes pages. Let me know if you want me to add those as well