1#![feature(once_cell_try)]
2#![feature(sync_unsafe_cell)]
3#![feature(iter_collect_into)]
4
5mod arc_bytes;
6mod collector;
7mod collector_entry;
8mod compaction;
9mod compression;
10mod constants;
11mod db;
12mod key;
13mod lookup_entry;
14mod merge_iter;
15pub mod meta_file;
16mod meta_file_builder;
17pub mod mmap_helper;
18mod parallel_scheduler;
19mod sst_filter;
20pub mod static_sorted_file;
21mod static_sorted_file_builder;
22mod value_block_count_tracker;
23mod value_buf;
24mod write_batch;
25
26#[cfg(test)]
27mod tests;
28
29pub use arc_bytes::ArcBytes;
30pub use compression::checksum_block;
31pub use db::{CompactConfig, MetaFileEntryInfo, MetaFileInfo, TurboPersistence};
32
33#[derive(Clone, Copy, Debug, PartialEq, Eq)]
34pub enum FamilyKind {
35 SingleValue,
40 MultiValue,
45}
46
47#[derive(Clone, Copy, Debug)]
49pub struct FamilyConfig {
50 pub kind: FamilyKind,
51}
52
53#[derive(Clone, Debug)]
58pub struct DbConfig<const FAMILIES: usize> {
59 pub family_configs: [FamilyConfig; FAMILIES],
60}
61
62impl<const FAMILIES: usize> Default for DbConfig<FAMILIES> {
63 fn default() -> Self {
64 Self {
65 family_configs: [FamilyConfig {
66 kind: FamilyKind::SingleValue,
67 }; FAMILIES],
68 }
69 }
70}
71pub use key::{KeyBase, QueryKey, StoreKey, hash_key};
72pub use meta_file::MetaEntryFlags;
73pub use parallel_scheduler::{ParallelScheduler, SerialScheduler};
74pub use static_sorted_file::{
75 BlockCache, BlockWeighter, SstLookupResult, StaticSortedFile, StaticSortedFileMetaData,
76};
77pub use static_sorted_file_builder::{
78 BLOCK_HEADER_SIZE, Entry, EntryValue, StreamingSstWriter, write_static_stored_file,
79};
80pub use value_buf::ValueBuffer;
81pub use write_batch::WriteBatch;