Details
Description
Some types are wrong in SQLiteDB class. A couple of things we detected:
- The function formatDataToSQLParams has a wrong return type based on the parameter type. The parameter type can probably be changed, because in both cases we call formatDataToInsert before calling it.
- When using formatDataToInsert we should declare that the type has changed after calling it, probably adding a return in the function with the new type.
- We could also try to verify that the parameters passed to insert/update match the type in DB. Right now we don't type it, and if you pass a wrong param it will fail.
- Related with the previous point, sometimes we declare records with Partial<DBRecord> but that isn't correct because it also makes non-nullable columns optional.