[GH-ISSUE #116] Move deletion of entries into Database and use proper types in that case #70

Closed
opened 2026-02-27 10:15:36 +03:00 by kerem · 0 comments
Owner

Originally created by @matze on GitHub (Feb 9, 2025).
Original GitHub issue: https://github.com/matze/wastebin/issues/116

Originally assigned to: @matze on GitHub.

As of now, we simply have a boolean field must_be_deleted and all users of the Database::get() function must act appropriately. Ideally, we do deletion because of expiration or first-time fetch in side that function and return an appropriate enum value for all cases, i.e. instead of having a direct database representation, it would be

enum Entry {
    NotFound,
    Expired,
    Burned(ActualEntry),  // Final access
    Ok(ActualEntry),
}
Originally created by @matze on GitHub (Feb 9, 2025). Original GitHub issue: https://github.com/matze/wastebin/issues/116 Originally assigned to: @matze on GitHub. As of now, we simply have a boolean field `must_be_deleted` and all users of the `Database::get()` function must act appropriately. Ideally, we do deletion because of expiration or first-time fetch in side that function and return an appropriate enum value for all cases, i.e. instead of having a direct database representation, it would be ```rust enum Entry { NotFound, Expired, Burned(ActualEntry), // Final access Ok(ActualEntry), } ```
kerem closed this issue 2026-02-27 10:15:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wastebin-matze#70
No description provided.