Class: EventStoreClient::GRPC::Commands::Streams::HardDelete
- Defined in:
- lib/event_store_client/adapters/grpc/commands/streams/hard_delete.rb
Instance Method Summary collapse
Methods inherited from Command
#connection_options, #initialize, #metadata, #request, #service, use_request, use_service
Constructor Details
This class inherits a constructor from EventStoreClient::GRPC::Commands::Command
Instance Method Details
#call(stream_name, options:, &blk) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/event_store_client/adapters/grpc/commands/streams/hard_delete.rb', line 13 def call(stream_name, options:, &blk) = (stream_name, ) yield if blk retry_request { service.delete(request.new(options: ), metadata: ) } rescue ::GRPC::FailedPrecondition => e # GRPC::FailedPrecondition may happen for several reasons. For example, stream may not # be existing, or :expected_revision option value does not match the current state of # the stream. So, re-raise our own error, and pass there the original message - just in # case. raise StreamDeletionError.new(stream_name, details: e.) end |