├── .gitignore ├── docs └── img.png ├── src ├── main.rs ├── db │ ├── mod.rs │ └── client.rs ├── core │ ├── mod.rs │ ├── btree.rs │ ├── command.rs │ ├── structs.rs │ └── renderer.rs └── templates │ ├── render_level.hbs │ ├── render_page.hbs │ └── render_tree.hbs ├── Cargo.toml ├── README.md └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /.idea 3 | history.* 4 | *.html 5 | *.log 6 | -------------------------------------------------------------------------------- /docs/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uds5501/postgres-page-inspector/HEAD/docs/img.png -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | mod core; 2 | mod db; 3 | 4 | use crate::core::handle_command_call; 5 | 6 | fn main() { 7 | handle_command_call(); 8 | } -------------------------------------------------------------------------------- /src/db/mod.rs: -------------------------------------------------------------------------------- 1 | mod client; 2 | 3 | pub use client::{init_client, get_index_info, get_metadata_page, get_page}; 4 | pub use client::IndexInfo; 5 | -------------------------------------------------------------------------------- /src/core/mod.rs: -------------------------------------------------------------------------------- 1 | mod command; 2 | pub(crate) mod btree; 3 | pub(crate) mod structs; 4 | pub(crate) mod renderer; 5 | 6 | pub use command::handle_command_call; 7 | pub use structs::{MetadataPage, Page, Tid}; 8 | pub use btree::Tree; 9 | pub use renderer::render; 10 | 11 | -------------------------------------------------------------------------------- /src/templates/render_level.hbs: -------------------------------------------------------------------------------- 1 |