Skip to content

BITFIELD_RO

Syntax

Terminal window
BITFIELD_RO key [GET type offset [GET type offset ...]]

Parameters

ParameterDescriptionTypeRequired
keyThe name of the key containing the bitfield.StringYes
GET type offsetRetrieves bits starting at the specified offset with the specified type. Type defines the signed/unsigned integer format.StringOptional

Return values

ConditionReturn Value
Command is successfulArray of results corresponding to each GET command
Syntax or specified constraints are invaliderror

Behaviour

  • Read-only variant of the BITFIELD command. It is like the original BITFIELD but only accepts GET subcommand.
  • See original BITFIELD for more details.

Example Usage

Basic Usage

Terminal window
127.0.0.1:7379> SET hello "Hello World"
OK
127.0.0.1:7379> BITFIELD_RO hello GET i8 16
1) "108"