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
split IDBCursor direction into isForward and isDuplicative #2694
Comments
These constants have been replaced by strings in the latest spec: http://www.w3.org/TR/IndexedDB/#dfn-direction "next", "nextunique", "prev" and "prevunique". |
Passing booleans is not great API design. It is better to have an enum I would prefer to get some more experience with the API before deciding on whether separating direction from unique keys is helpful. I'm going to leave this aligned with the DOM IDL, at least until Dart gets proper enums. Added this to the Later milestone. |
This comment was originally written by edouardtavi...@gmail.com Hi! Could you add the strings to some constant fields in dart:indexeddb Cursor? Twould be great :) |
This includes the following pub commits: git log --format="%C(auto) %h %s" 5b4df5a6f931c63622ac349602d6ef0367e8070f..fb72c1f774ca27556225b207185c0b6b6ab1c274 fb72c1f7 Make `run` available (but deprecated) in the embedding (#2698) 63b56ea4 Return the exit-code from commands (#2689) 7fc4e273 Deprecate top level (#2694) Change-Id: I5842b1ecb15fc7844d628e2ad5fb00e3f627dbff Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168347 Commit-Queue: Sigurd Meldgaard <sigurdm@google.com> Reviewed-by: Sigurd Meldgaard <sigurdm@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Jonas Jensen <jonasfj@google.com>
This issue was originally filed by @seaneagan
In IDBCursor, I think this...
static final int NEXT = 0;
static final int NEXT_NO_DUPLICATE = 1;
static final int PREV = 2;
static final int PREV_NO_DUPLICATE = 3;
final int direction;
...should be replaced by:
final bool isForward;
final bool isDuplicative;
and then in IDBIndex and IDBObjectStore:
IDBRequest openCursor([IDBKeyRange range, bool isForward = true, isDuplicative = true]);
IDBRequest openKeyCursor([IDBKeyRange range, bool isForward = true, isDuplicative = true]);
The text was updated successfully, but these errors were encountered: