react-native-sqlite-storage icon indicating copy to clipboard operation
react-native-sqlite-storage copied to clipboard

Fix Pre-Populated database for Windows

Open MacKenzieHnC opened this issue 2 years ago • 0 comments

Explanation

The issue stemmed from two separate places.

  1. .GetResults() seems to have been used as an attempted await, but does not function that way. Replaced with .get() which does.
  2. The original author considered it a failure state if the database already existed. They had set FailIfExists on the copy function, which is correct if you don't want to overwrite, but then they were returning without loading the database at all if that error fired. Replaced with a check for the error thrown by FailIfExists, which is ignored, while retaining error-checking for other types of failures (although I don't know what those would be).

Resolutions

resolves #519, resolves #491, resolves #487, resolves #451

MacKenzieHnC avatar Jan 01 '23 20:01 MacKenzieHnC