tikv / agatedb

A persistent key-value storage in rust.
Apache License 2.0
829 stars 74 forks source link

能给一些入门使用的例子吗 #172

Closed jiabochao closed 2 years ago

GanZiheng commented 2 years ago

可以参考 https://github.com/tikv/agatedb/blob/master/src/ops/transaction_test.rs 中的例子使用事务。

jiabochao commented 2 years ago

可以参考 https://github.com/tikv/agatedb/blob/master/src/ops/transaction_test.rs 中的例子使用事务。

但是在使用的时候像Entry这些实体是私有的:

module `entry` is private

我使用这种方式引入:

agatedb = { git = "https://github.com/tikv/agatedb.git", branch="master" }
GanZiheng commented 2 years ago

由于目前还没有考虑 AgateDB 被其他项目引用的问题,所以可见性方面比较草率,之后我会改进这一点。

对于 Entry 私有,可以通过在 lib.rs 中添加 pub use entry::Entry; 来解决。

jiabochao commented 2 years ago

期待!