-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hexists 和 hkeys 需要完善 #41
Comments
@moolex 你好, hkeys 支持分页, 参数为 hkeys($name, $key_start, $key_end, $limit). 如果需要判断表中是否存在某个key, 目前可以使用multi_hget, 未来会增加方法. |
关于hkeys的接口意义,我在实验中发现是这样的: 比如我有3个key值,a1,b2,c3 如果我想搜索出来b2,我就要用 hkeys(name, 'a', 'c', 1); 我的需求是按照key值的prefix来进行检索,发现只能对这个prefix的最后一位字符进行ASCII-1作为key_start,ASCII+1作为key_end,然后那个limit只能作为一次获取限制,不能用作分页了。 我总是觉得我这个使用方法不太对劲,但也没看到详细的说明文档,所以想请教下正确的使用方法是什么呢?谢谢 |
hi, ssdb数据集合的分页是游标分页, 和数据库的limit start, size, 不一样. 假设数据列表为: a, b, c, d, e, f, g 想分页, 每页2条记录. 那么第一页 hkeys h "" "" 2, 返回 a, b 然后下一页, hkeys h b "" 2 |
喔,原来是这样,我明白了。谢谢解答,希望SSDB可以越做越好! |
1、hexists 函数只能判断hash表是否存在,不能判断表中是否存在某个key
2、hkeys 函数只有limit,不支持start,大数据量分页的效果无法实现
The text was updated successfully, but these errors were encountered: