你的位置:首页 > 软件开发 > 数据库 > 关于redis中的数据类型

关于redis中的数据类型

发布时间:2016-02-29 17:00:06
一、 Redis常用数据类型Redis最为常用的数据类型主要有以下:StringHashListSetSorted set一张图说明问题的本质图一:图二:代码:/* Object types */#define REDIS_STRING 0#define REDIS_LIST 1 ...

一、 Redis常用数据类型

Redis最为常用的数据类型主要有以下:

  • String

  • Hash

  • List

  • Set

  • Sorted set

一张图说明问题的本质

图一:

关于redis中的数据类型

图二:

关于redis中的数据类型

代码:

/* Object types */#define REDIS_STRING 0#define REDIS_LIST 1#define REDIS_SET 2#define REDIS_ZSET 3#define REDIS_HASH 4 /* Objects encoding. Some kind of objects like Strings and Hashes can be * internally represented in multiple ways. The 'encoding' field of the object * is set to one of this fields for this object. */#define REDIS_ENCODING_RAW 0   /* Raw representation */#define REDIS_ENCODING_INT 1   /* Encoded as integer */#define REDIS_ENCODING_HT 2   /* Encoded as hash table */#define REDIS_ENCODING_ZIPMAP 3 /* Encoded as zipmap */#define REDIS_ENCODING_LINKEDLIST 4 /* Encoded as regular linked list */#define REDIS_ENCODING_ZIPLIST 5 /* Encoded as ziplist */#define REDIS_ENCODING_INTSET 6 /* Encoded as intset */#define REDIS_ENCODING_SKIPLIST 7 /* Encoded as skiplist */#define REDIS_ENCODING_EMBSTR 8 /* Embedded sds string encoding */

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:关于redis中的数据类型

关键词:Redis

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录