Bind a record to its unique id #130

Merged
savanni merged 2 commits from emseries/bound-records into main 2023-12-27 22:38:43 +00:00
Owner

In the past, I've managed this by having both the record and the unique id (if one exists) float around independently. This has lead to a lot of awkward code.

Now, if a record actually exists in the database, it's going to be a Record structure, which must have an ID. If the record is new, it's going to be just bare data, not a full Record data structure.

Also, I used to allow the Record to exist with a None data to indicate that the record has been deleted. Now, there is a distinction between a Record and the private structure to keep track of records within the database.

In the past, I've managed this by having both the record and the unique id (if one exists) float around independently. This has lead to a lot of awkward code. Now, if a record actually exists in the database, it's going to be a Record structure, which must have an ID. If the record is new, it's going to be just bare data, not a full Record data structure. Also, I used to allow the Record to exist with a None data to indicate that the record has been deleted. Now, there is a distinction between a Record and the private structure to keep track of records within the database.
savanni added 2 commits 2023-12-27 22:36:02 +00:00
savanni merged commit 149587f0bd into main 2023-12-27 22:38:43 +00:00
savanni deleted branch emseries/bound-records 2023-12-27 22:38:43 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
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: savanni/monorepo#130
No description provided.