deleteOnBatch method

  1. @override
void deleteOnBatch(
  1. ModelBatchRef ref,
  2. ModelAdapterDocumentQuery query
)
override

Describe the data deletion process when performing a batch.

The ModelBatchRef created by runBatch is passed to ref, and query is the query of the target document.

バッチを行う際のデータ削除処理を記述します。

refrunBatchで作成したModelBatchRefが渡され、queryは対象のドキュメントのクエリが渡されます。

Implementation

@override
void deleteOnBatch(
  ModelBatchRef ref,
  ModelAdapterDocumentQuery query,
) {
  if (ref is! JsonSourceModelBatchRef) {
    throw Exception("[ref] is not [LocalModelBatchRef].");
  }
  throw UnsupportedError("This adapter cannot delete.");
}