Skip to content

Conversation

@brettz9
Copy link
Contributor

@brettz9 brettz9 commented Apr 22, 2016

Building on previous PRs:

  • Breaking API change (minor)/Feature: addStore accepts optional copyFrom
    option object (used by new methods renameStore and copyStore) with
    a required name string key (the old store to copy from), an optional
    deleteOld boolean (default is false), and optional options object (for use in
    overriding the old store's properties on the new store). schema.stores now includes
    copyFrom information.

@brettz9 brettz9 force-pushed the rename-copy branch 2 times, most recently from 19111b9 to f2c98b3 Compare April 26, 2016 04:28
@brettz9
Copy link
Contributor Author

brettz9 commented Apr 26, 2016

Please hold off on this particular PR for now, as I think it may need a little more work.

@brettz9 brettz9 force-pushed the rename-copy branch 2 times, most recently from 109981f to c55bdc7 Compare May 2, 2016 02:10
brettz9 added 6 commits May 1, 2016 19:12
…allow a sequence of upgrades which can support promises returned by `addCallback` callbacks (and add docs and tests for multiple promise-based callbacks on different versions);

Commenting: Indicate specific Safari bug within code;
Refactoring: Use ES6 `Array.from`; add `Number.isInteger` and ES7 `Object.values()` in place of npm modules (requires babel-polyfill);
Testing: Split off local testing from Sauce; prevent blocking; increase timeout for Firefox; add test to throw with previous version
…ted `addCallback` ones, can themselves use idb-schema methods (e.g., to convert from JSON to idb-schema) though, since they execute within `upgradeneeded` cannot support Promises (as can the callbacks within `addCallback` when `schema.open` or `schema.upgrade` are used); document
… added previously)

- If `delStore` does throw later (or if there is any other upgrade error), the error can be caught by `callback` or `open`/`upgrade`
- Feature: Support `errBack` to `callback`
- Expand callback, delStore docs
… at run-time);

Fix: Allow stores and indexes to be an empty string;
Fix: allow empty-string key path (unless with autoIncrement);
Fix: disallow autoIncrement with array keyPath but enable for non-empty strings (as permitted by spec--keys overridable on put()/add())
Testing: Add tests for above
…n so that one can delete old stores or indexes and recreate them if desired (add tests);

- Refactoring: Put schema.open/schema.upgrade tests in own "describe" section
@brettz9 brettz9 force-pushed the rename-copy branch 2 times, most recently from 45bf8e4 to efff6ca Compare May 2, 2016 04:13
brettz9 added 2 commits May 2, 2016 18:13
… order,

  but the getter will continue to get the highest version. To get the current
  rather than highest version, the method `lastEnteredVersion()` has been
  added.
- Refactoring: better default behavior for getJSONStorage internal method
@brettz9
Copy link
Contributor Author

brettz9 commented May 3, 2016

FYI, this PR (and the one I just submitted and previous PRs) are all now ready. In addition to unit tests, I've also put them through some real world uses, so I think things should be working well now.

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.

1 participant