mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-02-19 12:04:54 +00:00
Implement ZSCAN Redis command.
This commit is contained in:
parent
78eee0e16f
commit
533b571771
2 changed files with 7 additions and 0 deletions
|
@ -137,4 +137,8 @@ namespace redis {
|
|||
auto Command::sscan (boost::string_ref parKey) -> sscan_range {
|
||||
return sscan_range(sscan_iterator(this, parKey, false), sscan_iterator(this, parKey, true));
|
||||
}
|
||||
|
||||
auto Command::zscan (boost::string_ref parKey) -> zscan_range {
|
||||
return zscan_range(zscan_iterator(this, parKey, false), zscan_iterator(this, parKey, true));
|
||||
}
|
||||
} //namespace redis
|
||||
|
|
|
@ -43,6 +43,8 @@ namespace redis {
|
|||
typedef boost::iterator_range<hscan_iterator> hscan_range;
|
||||
typedef ScanIterator<ScanSingleValuesInKey<std::string>> sscan_iterator;
|
||||
typedef boost::iterator_range<sscan_iterator> sscan_range;
|
||||
typedef ScanIterator<ScanPairs<std::pair<std::string, std::string>, ScanCommands::ZSCAN>> zscan_iterator;
|
||||
typedef boost::iterator_range<zscan_iterator> zscan_range;
|
||||
|
||||
Command ( std::string&& parAddress, uint16_t parPort );
|
||||
~Command ( void ) noexcept;
|
||||
|
@ -59,6 +61,7 @@ namespace redis {
|
|||
scan_range scan ( void );
|
||||
hscan_range hscan ( boost::string_ref parKey );
|
||||
sscan_range sscan ( boost::string_ref parKey );
|
||||
zscan_range zscan ( boost::string_ref parKey );
|
||||
|
||||
private:
|
||||
using RedisConnection = std::unique_ptr<redisContext, void(*)(redisContext*)>;
|
||||
|
|
Loading…
Add table
Reference in a new issue