refresh
Refreshes the local database with data fetched from the remote API.
This function performs the following steps:
Fetches all items from the local database.
Fetches all items from the remote API.
Compares the local and remote items:
If an item is present in the local database but not in the remote, it is deleted from the local database.
If an item is present in the remote but not in the local database, it is added to the local database.
If an item is present in both the local database and the remote, the local item is updated with the data from the remote.
Throws
If a timeout occurs while fetching data from the remote API.