You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/Usage.md
+61Lines changed: 61 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -156,3 +156,64 @@ alias MyApp.EventStore
156
156
```
157
157
158
158
You can also pass a list of `event_ids` instead of recorded event structs to link events.
159
+
160
+
## Deleting streams
161
+
162
+
There are two ways to delete streams. Soft delete and Hard delete.
163
+
164
+
Use soft delete when you no longer care about a streams events, but want to preserve the full history of events.
165
+
166
+
Use hard delete when you want a stream to go away more than a bad case of viral gastroenteritis (for example GDPR compliance).
167
+
168
+
### Soft delete
169
+
170
+
Will mark the stream as deleted, but will not delete its events. Events from soft deleted streams will still appear in the globally ordered all events ($all) stream and in any linked streams.
171
+
172
+
A soft deleted stream cannot be read nor appended to. Subscriptions to the deleted stream will not receive any events but subscriptions containing linked events from the deleted stream, such as the global all events stream, will still receive events from the deleted stream.
Will permanently delete the stream and its events. **This is irreversible and will remove data**. Events will be removed from the globally ordered all events ($all) stream and any linked streams.
194
+
195
+
After being hard deleted, a stream can later be appended to and read as if had never existed.
196
+
197
+
#### Examples
198
+
199
+
Since hard deletes are destructive and irreversible they are disabled by default. To use hard deletes you must first enable them for the event store:
0 commit comments