The connection shorthand object.
An operation such as
await conn.$.myStore.add(myitem)
Will add an item to the database store called myStore
.
Also see Example.
Close the connection to the database.
This must only be used on connections created with Database.newConnection.
Run a transaction on the connection.
This will create a new Transaction and run the given callback on it. If The callback completes successfully, the transaction is committed; if the callback throws, then the transaction is aborted.
Run some code with this connection and then close it afterwards.
If the code completes successfully, then the transaction will be committed. If the code throws, then the transaction will be aborted.
Generated using TypeDoc
Represents a connection to the database.
A connection offers no extra functionality beyond a Transaction, but grouping several transactions together into a single connection will be more efficient than creating a new connection for each transaction.