You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we are just writing sql in the routes specification directly and we don't have a lot of type safety for the things that we do with the DB.
This could be improved by putting an abstraction layer in between to protect the API logic from DB interaction logic. And then in the DB interaction logic, we can use interfaces that exactly match the DB table structure.
To be even more typesafe and in order not to repeat the database specification and typing, we could use sequelize typescript.
The text was updated successfully, but these errors were encountered:
francisduvivier
changed the title
Improve type safety for DB queries
Update DB to match proposed App Metadata Schema and Improve type safety
Nov 7, 2024
Currently we are just writing sql in the routes specification directly and we don't have a lot of type safety for the things that we do with the DB.
This could be improved by putting an abstraction layer in between to protect the API logic from DB interaction logic. And then in the DB interaction logic, we can use interfaces that exactly match the DB table structure.
To be even more typesafe and in order not to repeat the database specification and typing, we could use sequelize typescript.
The text was updated successfully, but these errors were encountered: