Skip to content

Complete connecting ALL new SQL backend functions #207

Description

@DannyThorne01

Task: Now we want to connect the backend with the new SQL functions that were created last week!

Features: You will be working a little bit in the SQL editor and mostly in backend/src/controller.

  • When a category gets sorted, the rankings should be static as in they should not be changing if a user selects to sort by a certain column. In other words, the rankings on the lefthand side should always be 1-22 for Aimags (Unless the user sorts in descending order) and 1-339 for Soums (Unless the user sorts in descending order).
  • Also, the sorting should reset if the user toggles between the two tables. For example, without loss of generality, if a user wants to sort in descending order for Below Capacity for Aimags, when they toggle to the Soums table, the previous arrangement of sorting by Below Capacity should not affect the way Soums is presented. The default Soums table should show up.
  • We want to first go in the SQL Editor and edit the Circle Grid Data for 1km query to make a circle_grid_data_1km_ZS table which will randomly create a table that has random values for z-scores for each cells
  • Similar to the previous ticket where we wanted to convert the functions that use jsonb type columns, we want to do the same for the Categorize Cell by Year function. Please make a new function with the same output.
  • Now this is for the tough part. Start by going through backend/src/controller/Cell.ts, look through every function in the file, and if it uses a previously written function, change it to the new one. If it is selecting and pulling data from a previously used table (the ones with jsonb as a column type), route it to the new tables made. TEST AS YOU GO since this is a very cautious task, so please please please test as you change each function. If it uses a function that we have yet asked you to redo with a new table, make the new function
  • Do the same for the functions in backend/src/controller/County.ts
  • Do the same for the functions in backend/src/controller/Province.ts

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions