-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add BITFIELD_RO #2340
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add BITFIELD_RO #2340
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2953,6 +2953,19 @@ async def test_bitfield_operations(self, r: redis.Redis): | |
) | ||
assert resp == [0, None, 255] | ||
|
||
@skip_if_server_version_lt("6.0.0") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realize the documentation is confusing here. But it appears the command is available since 6.0.0, but the help text indicates it's from Redis 6.2 @itamarhaber can you weigh in on which is correct, so that we get this tagged appropriately? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool thanks! Seems like a doc needs changing in redis-docs In that case, stamped. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
async def test_bitfield_ro(self, r: redis.Redis): | ||
bf = r.bitfield("a") | ||
resp = await bf.set("u8", 8, 255).execute() | ||
assert resp == [0] | ||
|
||
resp = await r.bitfield_ro("a", "u8", 0) | ||
assert resp == [0] | ||
|
||
items = [("u4", 8), ("u4", 12), ("u4", 13)] | ||
resp = await r.bitfield_ro("a", "u8", 0, items) | ||
assert resp == [0, 15, 15, 14] | ||
|
||
@skip_if_server_version_lt("4.0.0") | ||
async def test_memory_stats(self, r: redis.Redis): | ||
# put a key into the current db to make sure that "db.<current-db>" | ||
|
Uh oh!
There was an error while loading. Please reload this page.