Skip to content

Add 'copyBuffer' option

Compare
Choose a tag to compare
@glasstiger glasstiger released this 21 Sep 10:44
· 13 commits to main since this release
c71c8f9

This release introduces a new option called 'copyBuffer', the option is not set by default.
If the option is set the client will create a new buffer for each flush() call with the data belongs to the returned promise.
This prevents creating duplicate rows if await is missed when calling flush() or if the calls to flush() are not serialised.

Example:

const sender = new Sender({ copyBuffer: true });