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

Make ReadResultSet iterable [API-1315] #1399

Merged
merged 5 commits into from
Oct 14, 2022
Merged

Conversation

harunalpak
Copy link
Contributor

Following changes done:

  1. ReadResultSet interface was changed.
  2. Implemented LazyReadResultSet as iterable
  3. Added new test for testing LazyReadResultSet is iterable.
  4. Changed documentation of Ringbuffer by adding readMany sample.

@harunalpak harunalpak added this to the 5.2.0 milestone Oct 13, 2022
@devOpsHazelcast
Copy link
Contributor

devOpsHazelcast commented Oct 13, 2022

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Merging #1399 (7a9cb25) into master (7fdd497) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1399      +/-   ##
==========================================
- Coverage   93.30%   93.28%   -0.02%     
==========================================
  Files         464      464              
  Lines       16377    16384       +7     
  Branches     1331     1332       +1     
==========================================
+ Hits        15280    15284       +4     
- Misses        799      801       +2     
- Partials      298      299       +1     
Impacted Files Coverage Δ
src/core/ReadResultSet.ts 100.00% <ø> (ø)
src/proxy/ringbuffer/LazyReadResultSet.ts 100.00% <100.00%> (ø)
src/nearcache/NearCache.ts 92.24% <0.00%> (-1.56%) ⬇️
src/proxy/NearCachedMapProxy.ts 93.05% <0.00%> (-1.39%) ⬇️
src/network/Connection.ts 94.22% <0.00%> (-0.89%) ⬇️
src/protocol/ErrorFactory.ts 64.66% <0.00%> (ø)
src/core/HazelcastError.ts 78.03% <0.00%> (+0.75%) ⬆️
src/nearcache/RepairingTask.ts 93.10% <0.00%> (+3.44%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines 64 to 69
/**
* Returns an iterator for elements in the list.
*
* @returns the iterator for elements in the list.
*/
values(): Iterator<T>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. We can remove it.

@@ -42,4 +42,14 @@ describe('LazyReadResultSetTest', function () {
const set = new LazyReadResultSet(mockSerializationService, 4, [1, 2, 3, 4], [11, 12, 13, 14], 15);
expect(set.get(4)).to.be.undefined;
});

it('object can be iteratable', function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('object can be iteratable', function () {
it('should be iterable', function () {

"it should be iterable" is fine I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree you. I will correct it.

@harunalpak harunalpak merged commit 62a2183 into hazelcast:master Oct 14, 2022
harunalpak added a commit to harunalpak/hazelcast-nodejs-client that referenced this pull request Dec 8, 2022
* Make ReadResultSet iterable [API-1315]
* Changes made according to comments on PR.[API-1315]
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

3 participants