华夏棋牌

目录 搜索
Cluster cluster addslots(集群 槽位) cluster count failure reports(集群计数掉落败申报) cluster countkeysinslot cluster delslots cluster failover cluster forget cluster getkeysinslot cluster info cluster keyslot(集群键槽) cluster meet cluster nodes(集群节点) cluster replicate(集群复制) cluster reset(集群重置) cluster saveconfig cluster set config epoch cluster setslot cluster slaves cluster slots readonly readwrite Connection auth echo ping quit select swapdb Geo geoadd geodist geohash geopos georadius georadiusbymember Hashes hdel hexists hget hgetall hincrby hincrbyfloat hkeys hlen hmget hmset hscan hset hsetnx hstrlen hvals HyperLogLog pfadd pfcount pfmerge Keys del dump exists expire expireat keys migrate move object persist pexpire pexpireat pttl randomkey rename renamenx restore scan sort touch ttl type unlink wait Lists blpop brpop brpoplpush lindex linsert llen lpop lpush lpushx lrange lrem lset ltrim rpop rpoplpush rpush rpushx Pub/Sub psubscribe publish pubsub punsubscribe subscribe unsubscribe Scripting eval evalsha script debug script exists script flush script kill script load Server bgrewriteaof bgsave client getname client kill client list client pause client reply client setname command command count command getkeys command info config get config resetstat config rewrite config set dbsize debug object debug segfault flushall flushdb info lastsave monitor role save shutdown slaveof slowlog time Sets sadd scard sdiff sdiffstore sinter sinterstore sismember smembers smove spop srandmember srem sscan sunion sunionstore Sorted Sets zadd zcard zcount zincrby zinterstore zlexcount zrange zrangebylex zrangebyscore zrank zrem zremrangebylex zremrangebyrank zremrangebyscore zrevrange zrevrangebylex zrevrangebyscore zrevrank zscan zscore zunionstore Strings append bitcount bitfield bitop bitpos decr decrby get getbit getrange getset incr incrby incrbyfloat mget mset msetnx psetex set setbit setex setnx setrange strlen Transactions discard exec multi unwatch watch
文字

SETBIT key offset value

自2.2.0起可用。

时间严重年夜度: O(1)

设置或扫除存储在的字符串值中偏移量的位。

该位凭证设置或清零,可以是0或1.当不存在时,将培植一个新的字符串值。该字符串的增添,以确保它可以保持一点偏移量。所述偏移参数是必须的,以年夜于或即是0,且小于232(这个限制位图512MB)。当密钥华夏棋牌字符串增添时,添加的位设置为0。

正告:当设置最后一个能够的位(偏移量即是232 -1)而且存储在上的字符串值还没有网罗字符串值或生涯一个小字符串值时,Redis须要分配一切可壅闭服务器的中央存储器一段时间。在2010年的MacBook Pro上,设置232-1位(分配512MB)须要约300ms,设置位编号230-1(128MB分配)须要约80ms,设置位编号228-1(32MB分配)须要约30ms,设置位数字226 -1(8MB分配)须要〜8ms。请重视,一旦完成第一次分配,对统一个密钥的 SETBIT后续挪用将不会发生分配开支。

前往值

整数回复:存储在偏移处的原始位值。

例子

redis>  SETBIT mykey 7 1 (integer) 0 redis>  SETBIT mykey 7 0 (integer) 1 redis>  GET mykey "\u0000"

上一篇: 下一篇: