Skip to main content

worktable/
lib.rs

1pub mod in_memory;
2mod index;
3pub mod lock;
4mod mem_stat;
5pub mod persistence;
6mod primary_key;
7mod row;
8mod table;
9mod util;
10
11#[cfg(feature = "s3-support")]
12pub mod features;
13
14pub use index::*;
15pub use persistence::{PersistedWorkTable, PersistenceConfig};
16pub use row::*;
17pub use table::*;
18
19pub use data_bucket;
20pub use worktable_codegen::worktable;
21
22#[cfg(feature = "s3-support")]
23pub use worktable_codegen::s3_sync_persistence;
24
25pub mod prelude {
26    pub use crate::in_memory::{
27        ArchivedRowWrapper, Data, DataPages, Query, RowWrapper, StorableRow,
28    };
29    pub use crate::lock::FullRowLock;
30    pub use crate::lock::{Lock, RowLock};
31    pub use crate::lock::{LockGuard, LockMap};
32    pub use crate::mem_stat::MemStat;
33    pub use crate::persistence::{
34        DeleteOperation, DiskConfig, DiskPersistenceEngine, IndexTableOfContents, InsertOperation,
35        Operation, OperationId, PersistedWorkTable, PersistenceConfig, PersistenceEngine,
36        PersistenceTask, SpaceData, SpaceDataOps, SpaceIndex, SpaceIndexOps, SpaceIndexUnsized,
37        SpaceSecondaryIndexOps, UpdateOperation, map_index_pages_to_toc_and_general,
38        map_unsized_index_pages_to_toc_and_general, validate_events,
39    };
40    pub use crate::primary_key::{PrimaryKeyGenerator, PrimaryKeyGeneratorState, TablePrimaryKey};
41    pub use crate::table::select::{Order, QueryParams, SelectQueryBuilder, SelectQueryExecutor};
42    pub use crate::table::system_info::{IndexInfo, IndexKind, SystemInfo};
43    pub use crate::util::{OffsetEqLink, OrderedF32Def, OrderedF64Def};
44    pub use crate::{
45        AvailableIndex, Difference, IndexError, IndexMap, IndexMultiMap, MultiPairRecreate,
46        PrimaryIndex, TableIndex, TableIndexCdc, TableRow, TableSecondaryIndex,
47        TableSecondaryIndexCdc, TableSecondaryIndexEventsOps, TableSecondaryIndexInfo, UnsizedNode,
48        WorkTable, WorkTableError, vacuum::EmptyDataVacuum, vacuum::WorkTableVacuum,
49    };
50    pub use data_bucket::{
51        DATA_VERSION, DataPage, GENERAL_HEADER_SIZE, GeneralHeader, GeneralPage, INNER_PAGE_SIZE,
52        IndexPage, Interval, Link, PAGE_SIZE, PageType, Persistable, PersistableIndex,
53        SizeMeasurable, SizeMeasure, SpaceInfoPage, TableOfContentsPage, UnsizedIndexPage,
54        VariableSizeMeasurable, VariableSizeMeasure, align, get_index_page_size_from_data_length,
55        map_data_pages_to_general, parse_data_page, parse_page, persist_page, seek_to_page_start,
56        update_at,
57    };
58    pub use derive_more::{Display as MoreDisplay, From, Into};
59    pub use indexset::{
60        cdc::change::{ChangeEvent as IndexChangeEvent, Id as IndexChangeEventId},
61        core::{multipair::MultiPair as IndexMultiPair, pair::Pair as IndexPair},
62    };
63    pub use ordered_float::OrderedFloat;
64    pub use parking_lot::RwLock as ParkingRwLock;
65    pub use worktable_codegen::{MemStat, PersistIndex, PersistTable};
66
67    pub const WT_INDEX_EXTENSION: &str = ".wt.idx";
68    pub const WT_DATA_EXTENSION: &str = ".wt.data";
69
70    #[cfg(feature = "s3-support")]
71    pub use crate::features::{S3Config, S3DiskConfig, S3SyncDiskPersistenceEngine};
72}