DB_File 中的 R_CURSOR 是什么意思?

发布于 2024-11-28 01:04:25 字数 220 浏览 0 评论 0原文

我一直在尝试用 DB_File 关系替换一些旧 Perl 中的 BerkeleyDB 模块。阅读 CPAN 上的 DB_File 文档很有帮助,但并不完整。它提到了一些用于 put、tie 等的标志,但我不确定它们的含义。 R_CURSOR 就是其中之一。

具体来说,如果我将 putR_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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

永不分离 2024-12-05 01:04:25

尝试使用 man dbopen 来获取描述这些标志的 C 级 API,因为 DB_file 实际上是一个非常薄的包装器。

该标志的含义根据您使用的方法而有所不同,当与 put 一起使用时,这意味着值被替换(而不是在之前或之后添加)并且需要在现有搜索之后使用,即在 C 级别使用 seq 函数之后。

Try man dbopen for the C level API which describes these flags, as DB_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 the seq function at the C level.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文