Struct sewup::rdb::Db [−][src]
pub struct Db { /* fields omitted */ }
Expand description
DB is a storage space for an account in a specific block. We can import the storage from a past block, and we only commit the storage into the latest block.
Storage map
ⓘ
| 0th ~ 31th bytes | dynamic size | dynamic size | dynamic size |
|------------------|--------------|---------------------------|--------------|
| DB header | Table info | Table data of first table | ... |
DB Header
The fist 32 bytes are reserved as header of the store,
ⓘ
| 0th | 1st | 2nd ~ 3rd | ... | 28th ~ 31st |
|----------------|--------------|-------------------|-----|--------------------------|
| Sewup Features | version (BE) | RDB Features (LE) | - | length of TableInfo (BE) |
Base on the features, the storage may have different encoding in to binary
Implementations
create table for storage
get table with date loaded
drop table
get the numbers of tables