Comments (3)
Some remarks after taking look at those criteria after some time since those were written:
- The first item on the list qualifies rather as implementation detail and probably shouldn't be here
- That first point is rather problematic: there is no reason to have a separate table for the list if there will ever be only one for each task. The list can be implemented as an array in PostgreSQL.
PUT updates with changed index number should in such situation error with status 409 ("Conflict").
- this constraint simply makes a poor user experience and it shouldn't be here.
The first point is the most unfortunate in my opinion - as far as the API ergonomics go having an id mapping to a list which is in 1-to-1 relation with the task anyway makes no sense, querying the lists table through a join is less efficient and implementation is not even simpler this way. Because of that I will start with ignoring that criteria.
from tracke.rs.
Alright, now I remember what the list id was for - the list items need a boolean field marking whether it is completed or not and while it is supposedly possible to make diesel
work with PostgreSQL composite types (according to this issue, nvm, I do not want a link here, it would lead people looking for more info on that in here for nothing) we have no performance requirements (as part of the WAT2023 project) and so it is not worth the work at the moment. It will be easier to make task and list items have 1-to-many mapping with list table working as join table.
from tracke.rs.
So finally it ended up being the array of composite types - implemented in commit closing the issue #56
from tracke.rs.
Related Issues (20)
- Design and implement skeletons of API paths for handling tasks and trackers
- Wrap resources in responses into more suitable types
- Define user creation API HOT 1
- Implement endpoint authorization
- Remove env and protect secrets
- Integrate with SendGrid API
- Force and support HTTPS with self signed certificates
- Improve server errors with new types
- Add tags to the generated OAS
- Implement query params for filtering tasks by completion
- Accept PATCH requests for task updates
- Store lists with tasks and query them with diesel
- GET, POST, PUT, DELETE endpoints for managing lists attached to the task
- Document that attached list may have at most 128 elements
- write custom serialization for ListItems which adds index number
- Internal server error on PATCH to a task changing time_estimate field
- Use Hurl for API tests
- GET, PUT, POST, DELETE on singular list items
- Checkmark api for list items
- Protect server from having compromised authorised clients authorise more clients HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tracke.rs.