A read-only transaction cannot perform writes, but may be able to execute
more efficiently.
Like RunInTransactionOptions, but with a read-only transaction.
Args
options
TransactionOptions specifying options (number of retries, etc)
for this transaction
function
a function to be run inside the transaction on all remaining
arguments
*args: positional arguments for function.
**kwargs: keyword arguments for function.
Returns
the function's return value, if any
Raises
TransactionFailedError, if the transaction could not be committed.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-09-30 UTC."],[[["This function executes a specified function within a read-only datastore transaction."],["Read-only transactions, while unable to perform write operations, may operate more efficiently."],["The function accepts `TransactionOptions` to configure the transaction's behavior, such as the number of retries."],["The function's return value is passed back, if any is given."],["A `TransactionFailedError` is raised if the transaction fails to commit."]]],[]]