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

Implement INCR, INCRBY, INCRBYFLOAT, DECR and DECRBY commands #216

Merged
merged 18 commits into from
Sep 1, 2022

Conversation

danielealbano
Copy link
Owner

This PR implements a number of commands to increment and decrement integers and floats, namely the INCR, INCRBY, INCRBYFLOAT, DECR and DECRBY commands.

The PR includes also the require tests to ensure that they are working fine and their behaviour matches Redis behaviour.

In the PR there is also a change included to handle massive stack requests from the sprintf command, to handle very large long double numbers sprintf gets past the current stack of 32kb therefore it has been extended to 40kb.

@danielealbano danielealbano added the enhancement New feature or request label Sep 1, 2022
@danielealbano danielealbano added this to the v0.2 milestone Sep 1, 2022
@danielealbano danielealbano self-assigned this Sep 1, 2022
@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Base: 80.35% // Head: 80.56% // Increases project coverage by +0.20% 🎉

Coverage data is based on head (96ffc4e) compared to base (00b8b28).
Patch coverage: 82.04% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #216      +/-   ##
==========================================
+ Coverage   80.35%   80.56%   +0.20%     
==========================================
  Files         135      145      +10     
  Lines        8062     8435     +373     
==========================================
+ Hits         6478     6795     +317     
- Misses       1584     1640      +56     
Impacted Files Coverage Δ
src/utils_string_avx2.c 95.92% <ø> (ø)
src/utils_string_sw.c 100.00% <ø> (ø)
src/utils_string.c 63.64% <77.08%> (+4.94%) ⬆️
...nd/helpers/module_redis_command_helper_incr_decr.c 81.69% <81.69%> (ø)
...c/module/redis/command/module_redis_command_decr.c 100.00% <100.00%> (ø)
...module/redis/command/module_redis_command_decrby.c 100.00% <100.00%> (ø)
...c/module/redis/command/module_redis_command_incr.c 100.00% <100.00%> (ø)
...module/redis/command/module_redis_command_incrby.c 100.00% <100.00%> (ø)
...e/redis/command/module_redis_command_incrbyfloat.c 100.00% <100.00%> (ø)
...module/redis/command/module_redis_command_strlen.c 100.00% <0.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@danielealbano danielealbano merged commit 545b92d into main Sep 1, 2022
@danielealbano danielealbano deleted the implement_incr_decr_commands branch September 1, 2022 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant