|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
Redis结果集类 更多...
#include <redis_result.hpp>
Public 成员函数 | |
| redis_result () | |
| 默认构造函数 | |
| redis_result (::redisReply *reply) | |
| 构造函数 | |
| ~redis_result () override | |
| 析构函数 | |
| bool | empty () const noexcept override |
| 检查结果集是否为空 | |
| bool | next () noexcept override |
| 移动到下一个键值对 | |
| string_view | key () const noexcept override |
| 获取当前键 | |
| string_view | value () const noexcept override |
| 获取当前值 | |
| bool | value_bool () const override |
| 获取布尔值 | |
| int64_t | value_int64 () const override |
| 获取64位整数值 | |
| double | value_double () const override |
| 获取浮点值 | |
| vector< string > | value_array () const override |
| 获取数组值 | |
| const vector< pair< string, string > > & | value_hash () const override |
| 获取哈希表值 | |
| int | type () const noexcept |
| 获取Redis回复类型 | |
| bool | is_nil () const noexcept |
| 检查是否为空值回复 | |
额外继承的成员函数 | |
| Public 类型 继承自 neforce::idb_result | |
| using | size_type = size_t |
| 大小类型 | |
| using | difference_type = ptrdiff_t |
| 差值类型 | |
Redis结果集类
实现idb_kv_result接口, 自动解析不同类型的Redis回复,提供统一的访问接口。
主要功能:
在文件 redis_result.hpp 第 41 行定义.
| neforce::redis_result::redis_result | ( | ) |
默认构造函数
创建空结果集。
|
explicit |
构造函数
| reply | hiredis回复对象 |
解析Redis回复,构建结果集。
|
override |
析构函数
释放redisReply对象资源。
|
inlinenodiscardoverridevirtualnoexcept |
|
inlinenodiscardnoexcept |
|
nodiscardoverridevirtualnoexcept |
|
nodiscardoverridevirtualnoexcept |
移动到下一个键值对
用于遍历哈希表结果集(HGETALL)的键值对。 对于单值结果,首次调用返回true。
实现了 neforce::idb_result.
|
inlinenodiscardnoexcept |
|
nodiscardoverridevirtualnoexcept |
|
nodiscardoverridevirtual |
|
nodiscardoverridevirtual |
|
inlinenodiscardoverridevirtual |
获取哈希表值
返回解析后的键值对列表(用于HGETALL命令)。
在文件 redis_result.hpp 第 153 行定义.
引用了 value_hash().
被这些函数引用 value_hash().
|
nodiscardoverridevirtual |