kemzeb / planetvplanet

🌎 Web app that compares planets in our Solar System to exoplanets
GNU General Public License v3.0
1 stars 0 forks source link

Only receive a handful of records during a search query #2

Closed kemzeb closed 2 years ago

kemzeb commented 2 years ago

Currently, the data layer API will retrieve all records that match or contain a substring of some string input. This may not be the best option moving forward when this data is sent to the web frontend. Imagine the end-user typing away, looking for a particular planet, and suddenly their web page grows in size with thousands of exoplanet search results.

A solution to this is just to make changes to the data layer by limiting the number of records it should grab. One issue that needs to be addressed is if a row that matches the input (i.e. uses WHERE planet_name LIKE %[input string here]%, would it be possible for it not to be included when we limit the number of rows retrieved? This is more a question of how the LIMIT clause works. If it works like this, this is an issue that must be addressed by business logic rather than by a database query.

kemzeb commented 2 years ago

Resolved in 2d4337dd55f79c536f87727dfbd5541b3fc3ea39.