forked from ravendb/ravendb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RavenDB-23534 - delete the notifications for the database using the t…
…x merger
- Loading branch information
1 parent
a079c6f
commit c24f180
Showing
2 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/Raven.Server/Rachis/Commands/DeleteTableForNotificationsCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using Raven.Server.Documents.TransactionMerger.Commands; | ||
using Raven.Server.ServerWide.Context; | ||
|
||
namespace Raven.Server.Rachis.Commands; | ||
|
||
public class DeleteTableForNotificationsCommand : MergedTransactionCommand<ClusterOperationContext, ClusterTransaction> | ||
{ | ||
private readonly string _tableName; | ||
|
||
public DeleteTableForNotificationsCommand(string tableName) | ||
{ | ||
_tableName = tableName; | ||
} | ||
|
||
protected override long ExecuteCmd(ClusterOperationContext context) | ||
{ | ||
context.Transaction.InnerTransaction.DeleteTable(_tableName); | ||
return 1; | ||
} | ||
|
||
public override IReplayableCommandDto<ClusterOperationContext, ClusterTransaction, MergedTransactionCommand<ClusterOperationContext, ClusterTransaction>> ToDto(ClusterOperationContext context) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} |