DB_File 中的 R_CURSOR 是什么意思?
我一直在尝试用 DB_File 关系替换一些旧 Perl 中的 BerkeleyDB 模块。阅读 CPAN 上的 DB_File 文档很有帮助,但并不完整。它提到了一些用于 put、tie 等的标志,但我不确定它们的含义。 R_CURSOR
就是其中之一。
具体来说,如果我将 put
与 R_CURSOR
一起使用,这意味着什么?
I've been trying to replace BerkeleyDB module in some old Perl with DB_File ties. Reading the DB_File documentation on CPAN is helpful, but not complete. It mentions some flags to use for put, tie, etc and I'm not sure what they mean. R_CURSOR
is one of those.
Specifically, if I use put
with R_CURSOR
, what does that mean?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用
man dbopen
来获取描述这些标志的 C 级 API,因为DB_file
实际上是一个非常薄的包装器。该标志的含义根据您使用的方法而有所不同,当与 put 一起使用时,这意味着值被替换(而不是在之前或之后添加)并且需要在现有搜索之后使用,即在 C 级别使用 seq 函数之后。
Try
man dbopen
for the C level API which describes these flags, asDB_file
is really a very thin wrapper around that.The meaning of this flag differs according to which method you use it on, when used with
put
this means that a value is replaced (rather than added before or after) and needs to be used after an existing search, i.e., after using theseq
function at the C level.