Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 2016 12 21 #412

Merged
merged 9 commits into from
Dec 21, 2016
Merged

Fixes 2016 12 21 #412

merged 9 commits into from
Dec 21, 2016

Conversation

dfahlander
Copy link
Collaborator

  • Bug in rewritten Dexie.getDatabaseNames()
  • Added missing properties to typings (d.ts) files of Dexie.d.ts and Dexie.Observable.d.ts.
  • Dexie.Syncable: Correction of initial sync handling:
    • Don't await db.syncable.connect() to fulfill or reject each time the local database is opened. If DB has ever been synced with remote, we should rely on the offline state until connection is restablished. No need to halt queries while connecting.
    • Very first time a database connects to a server, we MUST be online and wait for the connect to complete. Assume that the initial sync is essential for the application to function.
  • Correction after running various unit tests for the addons:
    • Make sure to never reopen a closed database by accident.
  • Dexie.Syncable: Made 'url' index unique as it should be. Existing db's may be needing to increment their version.
  • Unit Test framework: Respect custom qUnit checkboxes.
  • Dexie bug: When outside a transaction, exception could be thrown instead of returning a rejected promise. This happened if either A) Database had been closed, B) indexedDB API was missing or C) Database had failed to open. Corrected so that a rejected promise is returned instead.
  • Dexie: Added db.hasBeenClosed()

Needed for Dexie.Syncable to handle connect() correctly.
* Don't await db.syncable.connect() to fulfill or reject each time the local database is opened. If DB has ever been synced with remote, we should rely on the offline state until connection is restablished. No need to halt queries while connecting.
* Very first time a database connects to a server, we MUST be online and wait for the connect to complete. Assume that the initial sync is essential for the application to function.

Correction after running various unit tests for the addons:
* Make sure to never reopen a closed database by accident.
@dfahlander dfahlander merged commit b7664d0 into master Dec 21, 2016
@dfahlander dfahlander deleted the temp/fixes-2016-12-21 branch December 22, 2016 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant