Closed lohrm-stabl closed 4 months ago
Describe the bug
In the documentation await is used for building up the batch. In the samples included in this repository not. Which one is correct? Is one more performant/recommended than the other?
await
To Reproduce
const batch = {}; ORGS.get({id: "stabl"}, { batch }); DEVICES.get({ id: "01HZEJQX97WA8JPYCTKWVDY7YP"}, { batch }); const results = await TABLE.batchGet(batch);
Seems to behave the exact same way as:
const batch = {}; await ORGS.get({id: "stabl"}, { batch }); await DEVICES.get({ id: "01HZEJQX97WA8JPYCTKWVDY7YP"}, { batch }); const results = await TABLE.batchGet(batch);
Expected behavior
The documentation should state what is correct/recommended. The samples should adhere to that.
Environment (please complete the following information):
Additional context Add any other context about the problem here.
Correct use is to await.
You may be able to get away with not using await on some paths, but it has not been tested to be always true.
Until thoroughly tested, I'd recommend using await.
Describe the bug
In the documentation
await
is used for building up the batch. In the samples included in this repository not. Which one is correct? Is one more performant/recommended than the other?To Reproduce
Seems to behave the exact same way as:
Expected behavior
The documentation should state what is correct/recommended. The samples should adhere to that.
Environment (please complete the following information):
Additional context Add any other context about the problem here.