Fixes according to PR review, adds inefficient update db call.

- want to do upsert or insertorreplace but the sqliteprovider doesn't support.
- instead, doing a query to check if the record exists, updating if so, else adding to the list of records to bulk insert.