首页 > 其他 > 详细

redis

时间:2020-07-29 23:46:05      阅读:109      评论:0      收藏:0      [点我收藏+]

查看数据存储类型

127.0.0.1:6379> object encoding name
"embstr"
127.0.0.1:6379> object encoding age
"int"


127.0.0.1:6379> set name "ddddddddddllljjddddddddddddddddddddddddd"
OK
127.0.0.1:6379> object encoding name
"embstr"

127.0.0.1:6379> strlen name
(integer) 40
127.0.0.1:6379> append name "dslkfjsljflsdjflsjdlfjsdlfjsldjflsjdlfsf"
(integer) 80
127.0.0.1:6379

 

setbit 

127.0.0.1:6379> set name abc
OK
127.0.0.1:6379> setbit name 6 1
(integer) 0
127.0.0.1:6379> setbit name 7 0
(integer) 1
127.0.0.1:6379> get name
"bbc"

 

redis

原文:https://www.cnblogs.com/brady-wang/p/13400030.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!