Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4210

Fix types in SQLiteDB class


    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.1.0
    • Others

      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.

            Unassigned Unassigned
            dpalou Dani Palou
            0 Vote for this issue
            2 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.