jamesplease / jamesplease/api-pls
Relationships
- Dominant language
- JavaScript
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Relationships are complex. This tracks all of the work that needs to get done.
| Cardinality | Representation | Full support |
| ------------- | --------------- | ------------ |
| many-to-one | Own table | ✓ |
| one-to-many | Host's table | |
| one-to-one (host) | Own table | ✓ |
| one-to-one (guest) | Host's table | |
| many-to-many | Associative table | |
### Full Support
"Full support" requires the following features:
- Supported in the database
- Read one
- Read many
- Updating a resource with that relationship
- Creating with that relationship
- Deleting the resources of the relationship and confirming what happens
A feature is supported when there is an integration test demonstrating that it functions.
*Note: For now, I'm going to ignore the behavior of deletes, as that's a 'whole 'nother set of complexities.*
### To-do's
This is a list of to-do's for each not-fully-supported relationship type:
#### Many-to-one
- [x] Supported in the database
- [x] Read one
- [x] guest
- [x] host
- [x] Read many
- [x] guest
- [x] host
- [ ] Updating a resource with that relationship
- [ ] guest
- [x] host
- [ ] Creating with that relationship
- [ ] guest
- [x] host
- [ ] Deleting resource in relationship
- [ ] host
- [ ] guest
#### One-to-one (guest)
- [x] Supported in the database
- [x] Read one
- [x] guest
- [x] host
- [x] Read many
- [x] guest
- [x] host
- [ ] Updating a resource with that relationship
- [ ] guest
- [ ] host
- [ ] Creating with that relationship
- [ ] guest
- [x] host
- [ ] Deleting resource in relationship
- [ ] host
- [ ] guest
#### Many-to-many
- [x] Supported in the database
- [x] Read one
- [x] guest
- [x] host
- [x] Read many
- [x] guest
- [x] host
- [ ] Updating a resource with that relationship
- [ ] guest
- [ ] host
- [ ] Creating with that relationship
- [ ] guest
- [ ] host
- [ ] Deleting resource in relationship
- [ ] host
- [ ] guest
Contributor guide
No contributing guide indexed for this repository
Research direction
Use the relationship matrix and the Many-to-one, One-to-one (guest), and Many-to-many checklists to identify an unfinished case. Start by locating the existing relationship implementation and integration tests for the supported cases. Done means the selected relationship behavior is supported in the database and has an integration test covering reading, updating, and creating as applicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql
- Domain
- api, backend, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100