-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: BatchWrite across entities #312
Comments
The interface of https://electrodb.dev/en/mutations/transact-write/#performing-write-transactions await yourService.batch
.write(({ entity1, entity2 }) => [
entity1
.put({ prop1: "value1", prop2: "value2" })
.commit(),
entity2
.delete({ prop1: "value1", prop2: "value2" })
.commit(),
])
.go(); |
Hey @yamatatsu 👋 Thanks for putting this together! It might be a little while before I can address this, but it makes sense and would be a great addition 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know ElectroDB have a feature
transaction.write()
.But when using
put()
anddelete()
, we want to useBatchWriteItem
because it is less cost and higher performance.The interface will be like following:
or
Actually,
BatchWriteItem
can effect to multiple table, but if following ElectroDBservice
concept, it is enough to provide the featureBatchWriteItem
only for entities closed in service I think.The text was updated successfully, but these errors were encountered: