在 ESE (JetBlue) 中,有没有办法限制使用多个键的搜索?
在 Extensbile Strage Engine (ESE/JetBlue) 中,我有一个表,其中包含我想要使用两个索引定位的数据,
假设每行都有三个整数 X、Y 和 Z。我想快速找到所有X=10 和 Y=20 的行(例如)
结果集将包含 X=10、Y=20 和 Z=(无论 Z 恰好在哪里)的所有条目,
这可能吗?
的顺序
JetSetCurrentIndex()、JetMakeKey()、JetSeek() 和 JetMove() 让我感到困惑。我不是 100% 这甚至是可能的,而不需要搜索 X=10 然后自己过滤所有 Y!=20 的值?
谢谢!
In Extensbile Strage Engine (ESE/JetBlue) I've got a table that contains data I'd like to locate using two indexes
assuming that each row has three integers X, Y, and Z. I'd like to quickly locate all the rows where X=10 and Y=20 (for example)
the resulting set would contain all the entries where X=10, Y=20, and Z= whever Z happened to be
is this possible?
the sequence of
JetSetCurrentIndex(), JetMakeKey(), JetSeek(), and JetMove() confuse me. i'm not 100% this is even possible without searching for X=10 and then filtering all values where Y!=20 myself?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 JetIntersectIndexes API 来执行此操作,它返回两个索引范围中包含的所有记录。您需要:
对于第一个键值:
JetOpenTable< /代码>
)
JetSetCurrentIndex< /代码>
)
JetMakeKey
,JetSeek
)JetMakeKey
,JetSetIndexRange
)对于第二个键值:
JetOpenTable
)JetSetCurrentIndex
)JetMakeKey
,JetSeek
)JetMakeKey
,JetSetIndexRange
)。调用
JetIntersectIndexes
使用两个索引范围来创建匹配书签的临时表。JetMove
)。检索记录书签 (JetRetrieveColumn
)并转到记录 (JetGotoBookmark
)。JetCloseTable
)。You can do that with the JetIntersectIndexes API, which returns all records contained in two index ranges. You need to:
For the first key value:
JetOpenTable
)JetSetCurrentIndex
)JetMakeKey
,JetSeek
)JetMakeKey
,JetSetIndexRange
)For the second key value:
JetOpenTable
)JetSetCurrentIndex
)JetMakeKey
,JetSeek
)JetMakeKey
,JetSetIndexRange
).Call
JetIntersectIndexes
with the two index ranges to create a temporary table of matching bookmarks.JetMove
). Retrieve the record bookmarks (JetRetrieveColumn
) and go to the records (JetGotoBookmark
).JetCloseTable
).