deleteTransactionFrom static method

TransactionRequestPayload deleteTransactionFrom(
  1. List<int> id,
  2. String collection
)

Implementation

static TransactionRequestPayload deleteTransactionFrom(
  List<int> id,
  String collection,
) {
  final primaryKey = Value()..bytesValue = id;
  final deleteOp = Operation_DeleteDocument()
    ..collection = collection
    ..primaryKey = primaryKey;
  final operation = Operation()..deleteDocument = deleteOp;
  final operations = DocumentOperations();
  operations.operations
    ..clear()
    ..add(operation);
  return TransactionRequestPayload()
    ..data = (TransactionData()..documentOperations = operations);
}