loadOnTransaction method
FutureOr<DynamicMap>
loadOnTransaction(
- ModelTransactionRef ref,
- ModelAdapterDocumentQuery query
override
Describe the data acquisition process when performing a transaction.
The ModelTransactionRef created by runTransaction is passed to ref
and the query of the target document is passed to query
.
Return a Json map retrieved from the database in the return value.
トランザクションを行う際のデータ取得処理を記述します。
ref
にrunTransactionで作成したModelTransactionRefが渡され、query
は対象のドキュメントのクエリが渡されます。
戻り値にデータベースから取得したJsonマップを返してください。
Implementation
@override
FutureOr<DynamicMap> loadOnTransaction(
ModelTransactionRef ref,
ModelAdapterDocumentQuery query,
) {
_assert();
return loadDocument(query);
}