react-native-sqlite-storage
react-native-sqlite-storage copied to clipboard
Fix Pre-Populated database for Windows
Explanation
The issue stemmed from two separate places.
.GetResults()seems to have been used as an attemptedawait, but does not function that way. Replaced with.get()which does.- The original author considered it a failure state if the database already existed. They had set
FailIfExistson 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 byFailIfExists, 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