It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
                            
                        
                    
                
                                已关闭8年。
            
                    
我正在开发小型数据库,并且我打算使用stx-btree实现将数据存储在btree中。

是否可以在光盘上存储stx-btree

提前致谢!

更新:我需要在内存中保留btree并在必要时加载/保存所需的树节点。

最佳答案

我对c或c ++甚至btree的了解甚少,但在审查时看到了这个问题,并用Google搜索了它,因为它看起来很有趣! ...

看看这个gitHub页面:

https://github.com/fakechris/stx-btree-ondisk

--- Extensions ---

Beyond the usual STL interface the B+ tree classes support some extra goodies.

// Output the tree in a pseudo-hierarchical text dump to std::cout. This
// function requires that BTREE_DEBUG is defined prior to including the btree
// headers. Furthermore the key and data types must be std::ostream printable.
void print() const;

// Run extensive checks of the tree invariants. If a corruption in found the
// program will abort via assert(). See below on enabling auto-verification.
void verify() const;

// Serialize and restore the B+ tree nodes and data into/from a binary image.
// This requires that the key and data types are integral and contain no
// outside pointers or references.
void dump(std::ostream &os) const;
bool restore(std::istream &is);

关于c++ - 光盘上的stx-btree存储,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8313295/

10-11 02:59