ensureExists method

Future<void> ensureExists()

Implementation

Future<void> ensureExists() async {
  if (!await exists()) {
    try {
      await create();
    } on ArangoError catch (e) {
      const duplicateName = 1207;
      if (e.errorNum == duplicateName) {
        return;
      } else {
        rethrow;
      }
    }
  }
}