- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - String Getbit Command
Redis GETBIT command is used to get the bit value at the offset in the string value stored at the key.
Return Value
Integer, the bit value stored at the offset.
Syntax
Following is the basic syntax of Redis GETBIT command.
redis 127.0.0.1:6379> GETBIT KEY_NAME OFFSET
Example
redis 127.0.0.1:6379> SETBIT mykey 7 1 (integer) 0 redis 127.0.0.1:6379> GETBIT mykey 0 (integer) 0 redis 127.0.0.1:6379> GETBIT mykey 7 (integer) 1 redis 127.0.0.1:6379> GETBIT mykey 100 (integer) 0
redis_strings.htm
Advertisements