We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
我知道,这个问题是 5 年前提出的,但为了完整起见,嵌入式 MongoDB 已经发生:
https:// /github.com/hamiltop/MongoLiteDB
I know, the question was asked 5 years ago, but just for completeness' sake, embedded MongoDB has happened since:
https://github.com/hamiltop/MongoLiteDB
它还没有准备好,但 CouchDB 的嵌入式版本已经在长期路线图上。
复制旨在通过 CouchDB 启用离线应用程序。如果您最终有非常具体的需求,您可以将数据从 couchdb 复制到本地数据结构,在本地存储,更新它,然后通过复制将数据推回,但这需要一些代码。
It's not ready yet, but embeddable version of CouchDB are on the long term roadmap.
Replication is intended to enable offline applications with CouchDB. If you ended up with very specific needs you could replicate data from couchdb to a local datastructure, store it locally, update it, and push the data back via replication but it would take some code.
如果您使用 Perl,我推荐
DBM::Deep
,它在磁盘上存储任意数据结构,包括带有提交/回滚的事务,并且它是非 C 单一 Perl 模块安装。没有比这更轻的了。If you were using Perl, I'd recommend
DBM::Deep
, which stores arbitrary data structures on disk, including transactions with commit/rollback, and it's a non-C one-Perl-module install. Doesn't get much lighter than that.我几乎觉得你可以做一些黑客来实现这一点。
有一个表,使用 sqlite 的行 id 以及集合名称字段和文本 blob(将是 json 代码)。
有另一个表用于对集合中的字段进行索引(集合名称、字段名称、字段值、文档行 ID)。
您可以做一些包装类来处理更新和查找之类的事情。会很有趣的。
I almost feel you could do some sort of hack to achieve this.
Have a table using sqlite's row ids along with a field for collection name and text blob that would be json code.
Have another table for indexing with fields in a collection (collection name, field name, field value, document row id).
You could do some wrapper class to handle things like updates and lookups. Would be interesting.