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

split IDBCursor direction into isForward and isDuplicative #2694

Closed
DartBot opened this issue Apr 23, 2012 · 4 comments
Closed

split IDBCursor direction into isForward and isDuplicative #2694

DartBot opened this issue Apr 23, 2012 · 4 comments
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Apr 23, 2012

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]);

@madsager
Copy link
Contributor

Added Area-DOM, Triaged labels.

@rakudrama
Copy link
Member

These constants have been replaced by strings in the latest spec: http://www.w3.org/TR/IndexedDB/#dfn-direction

"next", "nextunique", "prev" and "prevunique".

@rakudrama
Copy link
Member

Passing booleans is not great API design. It is better to have an enum
(direction: FORWARD, direction: BACKWARD) rather than (isForward: true, isForward: false).

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.
Removed Type-Defect label.
Added Type-Enhancement, WontFix labels.

@DartBot
Copy link
Author

DartBot commented Oct 3, 2013

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 :)

@DartBot DartBot added this to the Later milestone Oct 3, 2013
@kevmoo kevmoo added closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug and removed resolution-wont_fix labels Mar 1, 2016
dart-bot pushed a commit that referenced this issue Nov 6, 2020
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 closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants