bitfield_ro.3valkey - Man Page
Performs arbitrary read-only bitfield integer operations on strings.
Synopsis
BITFIELD_RO key [GET encoding offset [GET encoding offset ...]]
Description
Read-only variant of the valkey-bitfield(7) BITFIELD command. It is similar to the original BITFIELD but only accepts GET subcommand and can safely be used in read-only replicas.
Since the original BITFIELD has SET and INCRBY options, it is technically flagged as a writing command in the Valkey command table. For this reason, read-only replicas in a Valkey Cluster will redirect it to the master instance even if the connection is in read-only mode (see the valkey-readonly(7) READONLY command of Valkey Cluster).
See original BITFIELD for more details.
BITFIELD_RO hello GET i8 16
Reply
valkey-protocol(7) Array reply: each entry being the corresponding result of the sub-command given at the same position.
Complexity
O(1) for each subcommand specified
Acl Categories
@bitmap @fast @read
History
- Available since: 6.0.0
See Also
bitcount(3valkey), bitfield(3valkey), bitop(3valkey), bitpos(3valkey), getbit(3valkey), setbit(3valkey)