hazelcast / hazelcast-nodejs-client

Hazelcast Node.js Client
https://hazelcast.com/clients/node-js/
Apache License 2.0
150 stars 59 forks source link

Add filter argument to Ringbuffer interface [API-1294] #1393

Closed fatihozer0 closed 1 year ago

fatihozer0 commented 2 years ago

I am not sure if anything is right but can not say why it is wrong. I tried this on some other codes to try if it works and worked but not sure.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1393 (dbd6ab5) into 5.1.x (baa1fa9) will decrease coverage by 0.34%. The diff coverage is n/a.

@@            Coverage Diff             @@
##            5.1.x    #1393      +/-   ##
==========================================
- Coverage   92.12%   91.77%   -0.35%     
==========================================
  Files         463      463              
  Lines       16347    16346       -1     
  Branches     1329     1329              
==========================================
- Hits        15060    15002      -58     
- Misses        897      950      +53     
- Partials      390      394       +4     
Impacted Files Coverage Δ
src/codec/ClientAuthenticationCustomCodec.ts 42.22% <0.00%> (-33.34%) :arrow_down:
src/network/ConnectionManager.ts 75.35% <0.00%> (-8.46%) :arrow_down:
src/invocation/InvocationService.ts 94.11% <0.00%> (-1.18%) :arrow_down:
src/config/ConfigBuilder.ts 89.67% <0.00%> (-1.01%) :arrow_down:
src/invocation/ClusterService.ts 94.01% <0.00%> (-0.86%) :arrow_down:
src/core/HazelcastError.ts 77.27% <0.00%> (-0.76%) :arrow_down:
src/protocol/ErrorFactory.ts 64.66% <0.00%> (-0.76%) :arrow_down:
src/HazelcastClient.ts 93.37% <0.00%> (-0.04%) :arrow_down:
src/util/Util.ts 87.89% <0.00%> (ø)
src/proxy/NearCachedMapProxy.ts 94.32% <0.00%> (+1.41%) :arrow_up:
... and 1 more

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

srknzl commented 2 years ago

I am not sure if anything is right but can not say why it is wrong.

😄 What?

Looks good, thanks

srknzl commented 2 years ago

Adding a test may not be possible because server side code is needed. I don't know if we have a filter in the test jar. A code sample requires users to write java code in the server side. Not good.

You are right about the documentation. API documentation can be added. Also there can be a small section about the filter in section https://github.com/hazelcast/hazelcast-nodejs-client/blob/master/DOCUMENTATION.md#847-using-ringbuffer

yuce commented 2 years ago

@srknzl The python client has two tests which uses the filter: https://github.com/hazelcast/hazelcast-python-client/blob/b8dd0d737ef976922311a8241e2a51b50e7ab3fa/tests/integration/backward_compatible/proxy/ringbuffer_test.py#L230 Could you guys check them out to see whether they can be ported to the Node.js client?

srknzl commented 2 years ago

We can do and we should. It is in the test jar.

https://github.com/hazelcast/hazelcast/blob/14ef0dbefa4a6fa00a50a8873aeea02ec6c3f5e4/hazelcast/src/test/java/com/hazelcast/client/test/PrefixFilter.java#L26

fatihozer0 commented 2 years ago

Added a test which is not ported. I checked the links you shared. Gonna add documentations now

fatihozer0 commented 1 year ago

Continues on #1413