Comments (4)
@moolex 你好, hkeys 支持分页, 参数为 hkeys($name, $key_start, $key_end, $limit). 如果需要判断表中是否存在某个key, 目前可以使用multi_hget, 未来会增加方法.
from ssdb.
关于hkeys的接口意义,我在实验中发现是这样的:
比如我有3个key值,a1,b2,c3
如果我想搜索出来b2,我就要用 hkeys(name, 'a', 'c', 1);
我的需求是按照key值的prefix来进行检索,发现只能对这个prefix的最后一位字符进行ASCII-1作为key_start,ASCII+1作为key_end,然后那个limit只能作为一次获取限制,不能用作分页了。
我总是觉得我这个使用方法不太对劲,但也没看到详细的说明文档,所以想请教下正确的使用方法是什么呢?谢谢
from ssdb.
hi, ssdb数据集合的分页是游标分页, 和数据库的limit start, size, 不一样. 假设数据列表为:
a, b, c, d, e, f, g
想分页, 每页2条记录. 那么第一页 hkeys h "" "" 2, 返回
a, b
然后下一页, hkeys h b "" 2
from ssdb.
喔,原来是这样,我明白了。谢谢解答,希望SSDB可以越做越好!
from ssdb.
Related Issues (20)
- SSDB 日志文件输出错误信息
- ssdb-repair 修复完了,一直repair HOT 1
- s
- Compiler Error : Undefined symbols for architecture x86_64
- 双主ssdb,重启其中一台出现OUT_OF_SYNC HOT 3
- 同样的双主配置,在宿主机可以启动,在K8S集群启动失败提示:
- 吴祖洋什么时候可以出来澄清,说下懒投资状态呢
- ssdb-dump 无法备份 noauth HOT 1
- mac 无法安装
- 读写低,磁盘io却被打满 HOT 3
- open db failed:IO error Urgent!!!
- SSDB 占用的磁盘没有释放。请问什么原因呢?
- SSDB占用内存很大 HOT 1
- After running a while, segfaults every time server started
- Memory Usage documentation formula doubt
- Is it a good idea to use ssdb as file storage? HOT 1
- 构造Binlog对象时的seq参数为何没有进行大小端转换再写入,load的时候seq也没有进行转换?
- 配置不能在一行写注释
- resp.cpp使用sprintf导致ssdb CoreDump
- Project SSDB is alive? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssdb.