Git Product home page Git Product logo

Comments (3)

Adhalianna avatar Adhalianna commented on June 20, 2024

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.

Adhalianna avatar Adhalianna commented on June 20, 2024

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.

Adhalianna avatar Adhalianna commented on June 20, 2024

So finally it ended up being the array of composite types - implemented in commit closing the issue #56

from tracke.rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.