getbit
GETBIT
Redis 開発者教育Redis Developer Course |
Redis 定期点検/技術支援Redis Technical Support |
Redis エンタープライズサーバRedis Enterprise Server |
|---|
BIT値の照会
offsetは0から始まります。
Example
| コマンド> | set key A |
| 結果> | OK |
| コマンド> | getbit key 6 |
| 結果> | 0 |
| コマンド> | getbit key 7 |
| 結果> | 1 |
| コマンド> | getbit key 100 存在しないbitを指定すると、0をリターン |
| 結果> | 0 |
コマンド
GETBIT key offset
- このコマンドは、version 2.2.0 から使用することができます。
- 論理的処理の所要時間はO(1)です。
| 関連コマンド | SETBIT, BITOP, BITCOUNT, BITPOS |
| Clients for Java | Jedis, Lettuce, Redisson | Clients for C | Hiredis |
| << SETBIT | GETBIT | BITOP >> |
|---|
クリック件数 :
Email
返事がかかってなれば、メールでお知らせします。
