~ethanmad/bouts.app#6: 
Display sorted data slices

#What is this about?

Slices rendered are not sorted and they should be.

#How to fix it?

Add something like ORDER BY date ASC, round ASC, position ASC. See gorm's docs.

#When should this be fixed?

Around MVP time.

Status
RESOLVED IMPLEMENTED
Submitter
~ethanmad
Assigned to
Submitted
2 years ago
Updated
1 year, 7 months ago
Labels
type:enhancement

~ethanmad 2 years ago

Addressed by today's work in commits:

  • 8710c47c7fec2189997b2ee26bc14d7a6a8ba0b5 sorts []Bout returned by MatchDB.BoutsByID(id uint) by position.
  • b47a4d9a146391a5ac2317d34fd6adf5919d7e6a sorts []Fencer returned by FencerDB.All() by school name, category, fencer name.
  • cfe81e9c565bbe025bcea4c2382a953adf479451 sorts []Bout returned by FencerDB.BoutsByID(id uint) by time of date, round, position.
  • 5960f764ae3988f0fc43b1a37281665cbb2b7aa8 sorts []Event returned by EventDB.All() by date.
  • 2707eddd4f977492f7704f622db42499d75da00a sorts []Match returned by EventDB.MatchesByID(id uint) by round, left school name, category.
  • 97900a08a0368d80633d5c30d0e038ba544438c2 sorts []Bout returned by BoutDB.AllWithNames().

Yet to be done:

  • SchoolDB.SquadsByID(id uint) and SchoolDB.FencersByID(id uint).
  • SquadDB.FencersByID(id uint).

~ethanmad 2 years ago

(re submission with formatting)

Addressed by today's work in commits:

  • 8710c47c7fec2189997b2ee26bc14d7a6a8ba0b5 sorts []Bout returned by MatchDB.BoutsByID(id uint) by position.
  • b47a4d9a146391a5ac2317d34fd6adf5919d7e6a sorts []Fencer returned by FencerDB.All() by school name, category, fencer name.
  • cfe81e9c565bbe025bcea4c2382a953adf479451 sorts []Bout returned by FencerDB.BoutsByID(id uint) by time of date, round, position.
  • 5960f764ae3988f0fc43b1a37281665cbb2b7aa8 sorts []Event returned by EventDB.All() by date.
  • 2707eddd4f977492f7704f622db42499d75da00a sorts []Match returned by EventDB.MatchesByID(id uint) by round, left school name, category.
  • 97900a08a0368d80633d5c30d0e038ba544438c2 sorts []Bout returned by BoutDB.AllWithNames() by ID.

Yet to be done:

  • SchoolDB.SquadsByID(id uint) and SchoolDB.FencersByID(id uint).
  • SquadDB.FencersByID(id uint).

~ethanmad 2 years ago

SchoolDB.SquadsByID(id uint) sorted by category by 16c3bbe5b2edf09835fe10b089ce1e1f9fe59e6e.

SchoolDB.FencersByID isn't used by any controllers, so it's return value need not be sorted. (It is used to check if a school is free for deletion.)

~ethanmad REPORTED IMPLEMENTED 2 years ago

SquadsDB.FencersByID(id uint) sorted by fencer name by 5a6328556a8f21127b8adb5e39a8bdd8babf3d15.

Closing issue.

~ethanmad referenced this from #13 1 year, 7 months ago

Register here or Log in to comment, or comment via email.