deleteOnTransaction method
Describe the data deletion 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
.
トランザクションを行う際のデータ削除処理を記述します。
ref
にrunTransactionで作成したModelTransactionRefが渡され、query
は対象のドキュメントのクエリが渡されます。
Implementation
@override
void deleteOnTransaction(
ModelTransactionRef ref,
ModelAdapterDocumentQuery query,
) {
if (ref is! CsvSourceModelTransactionRef) {
throw Exception("[ref] is not [LocalModelTransactionRef].");
}
throw UnsupportedError("This adapter cannot delete.");
}