You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, calling await transaction.start() is a duplication and leads to error because it is implicitly invoked by await database.transaction(), as can be seen from this snippet of code.
Although both forms are correct, keeping them both in the documentation will be confusing. I recommend that we keep the first one because it is simpler.
The text was updated successfully, but these errors were encountered:
According to the encode/Databases documentation about Transactions, a common pattern for lower-level transaction API is:
However, calling
await transaction.start()
is a duplication and leads to error because it is implicitly invoked byawait database.transaction()
, as can be seen from this snippet of code.So, the documentation should skip calling
start
:In the chat room, @aminalaee pointed out it would be possible to use
start
too if thetransaction
instantiation wasn'tawaited
:Although both forms are correct, keeping them both in the documentation will be confusing. I recommend that we keep the first one because it is simpler.
The text was updated successfully, but these errors were encountered: