From 59f671fe4dd3fa55192cecc03e71811f1d6d2cdc Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Tue, 25 Nov 2025 23:58:17 +0000 Subject: [PATCH] feat: start converting reftable-table.h There's not much here, but this prompted some nice conversation with Coded on approach so I'm still pushing up... --- src/reftable/fsck.rs | 2 ++ src/reftable/mod.rs | 1 + src/reftable/reftable_table.rs | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 src/reftable/reftable_table.rs diff --git a/src/reftable/fsck.rs b/src/reftable/fsck.rs index b53ef9484b..c8645c318b 100644 --- a/src/reftable/fsck.rs +++ b/src/reftable/fsck.rs @@ -1,3 +1,5 @@ +use crate::reftable::reftable_table::ReftableTable; + pub enum ReftableFsckError { TableName, MaxValue, diff --git a/src/reftable/mod.rs b/src/reftable/mod.rs index e675a3bca3..b1968abe14 100644 --- a/src/reftable/mod.rs +++ b/src/reftable/mod.rs @@ -7,6 +7,7 @@ pub mod iter; pub mod merged; pub mod pq; pub mod record; +pub mod reftable_table; pub mod stack; pub mod system; pub mod table; diff --git a/src/reftable/reftable_table.rs b/src/reftable/reftable_table.rs new file mode 100644 index 0000000000..9c795df7ad --- /dev/null +++ b/src/reftable/reftable_table.rs @@ -0,0 +1,14 @@ +pub struct ReftableTable { + pub name: String, + pub source: ReftableBlockSource, + pub size: u64, + pub hash_id: ReftableHash, + pub block_size: u32, + pub min_update_index: u64, + pub max_update_index: u64, + pub object_id_len: i32, // TODO: is this the right integer size? (originally was int) + pub version: i32, // TODO: is this the right integer size? (originally was int) + pub ref_offsets: ReftableTableOffsets, + pub obj_offsets: ReftableTableOffsets, + pub log_offsets: ReftableTableOffsets, +} -- 2.51.2