Commit method

Future<Null> Commit(
  1. ClientContext ctx
)

Implementation

Future<Null> Commit(ClientContext ctx) async {
  if (readOnly) {
    throw ErrReadOnly;
  } else if (finished) {
    throw ErrFinished;
  } else {
    try {
      await dc!.commitOrAbort(ctx, context!);
    } on GrpcError catch (e) {
      if (e.code == StatusCode.aborted) {
        throw ErrAborted;
      }
    }
  }
}