Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

iterator: data as buffers by default #42

Closed
wants to merge 1 commit into from

Conversation

juliangruber
Copy link
Member

this is another fix required for the new abstract-leveldown

@mcollina
Copy link
Member

mcollina commented Jul 7, 2015

👍

Should we merge it directly, or merge as a single branch?

@juliangruber
Copy link
Member Author

the branch name is missleading, i'll create separate branches for further fixes

timkuijsten pushed a commit to timkuijsten/level.js that referenced this pull request Feb 4, 2016
Fixes Level#43 Level#40 and Level#3. Unfortunately not easy to split out in separate commits.

1. Level#43 "snapshots seem not to work"

The reason snapshots didn't work in the test, is because the iterator was only
opened on the first call to _next. The new version opens the iterator right
away in the constructor (if there is no KeyRange error).

2. Level#40 "abstract-leveldown tests aren't all passing anymore"

Partially fixed by merging PR Level#42 and further fixed by this commit.

3. Level#3 "stop batch reads after limit is reached"

The solution is stop calling cursor.continue() once the limit is reached. The
transaction will automatically timeout as prescribed by the spec. idb-wrapper
can't be used for this because limit is only respected if autoContinue is true.

All 563 tests pass on:
* Safari 9.0.3
* Firefox 45.0b2
* Firefox 46.0a2
* Iridium 44.1 (Chrome/44.0.2403.157)
mvayngrib pushed a commit to mvayngrib/level.js that referenced this pull request Aug 21, 2016
Fixes Level#43 Level#40 and Level#3. Unfortunately not easy to split out in separate commits.

1. Level#43 "snapshots seem not to work"

The reason snapshots didn't work in the test, is because the iterator was only
opened on the first call to _next. The new version opens the iterator right
away in the constructor (if there is no KeyRange error).

2. Level#40 "abstract-leveldown tests aren't all passing anymore"

Partially fixed by merging PR Level#42 and further fixed by this commit.

3. Level#3 "stop batch reads after limit is reached"

The solution is stop calling cursor.continue() once the limit is reached. The
transaction will automatically timeout as prescribed by the spec. idb-wrapper
can't be used for this because limit is only respected if autoContinue is true.

All 563 tests pass on:
* Safari 9.0.3
* Firefox 45.0b2
* Firefox 46.0a2
* Iridium 44.1 (Chrome/44.0.2403.157)
@vweevers vweevers mentioned this pull request May 23, 2018
@vweevers
Copy link
Member

Superseded by #68.

@vweevers vweevers closed this May 23, 2018
@vweevers vweevers deleted the fix-for-new-abstract-leveldown branch May 23, 2018 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants