Skip to main content

reifydb_store_multi/warm/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2025 ReifyDB
3
4//! Warm storage tier.
5//!
6//! Placeholder for future warm tier storage implementation.
7
8use std::{collections::HashMap, ops::Bound};
9
10use reifydb_core::common::CommitVersion;
11use reifydb_type::{Result, util::cowvec::CowVec};
12
13use crate::tier::{EntryKind, RangeBatch, RangeCursor, TierBackend, TierStorage};
14
15/// Warm storage tier.
16///
17/// This is a placeholder enum with no variants yet.
18/// Will be implemented when warm tier storage is needed.
19#[derive(Clone)]
20pub enum WarmStorage {}
21
22impl TierStorage for WarmStorage {
23	fn get(&self, _table: EntryKind, _key: &[u8], _version: CommitVersion) -> Result<Option<CowVec<u8>>> {
24		match *self {}
25	}
26
27	fn set(
28		&self,
29		_version: CommitVersion,
30		_batches: HashMap<EntryKind, Vec<(CowVec<u8>, Option<CowVec<u8>>)>>,
31	) -> Result<()> {
32		match *self {}
33	}
34
35	fn range_next(
36		&self,
37		_table: EntryKind,
38		_cursor: &mut RangeCursor,
39		_start: Bound<&[u8]>,
40		_end: Bound<&[u8]>,
41		_version: CommitVersion,
42		_batch_size: usize,
43	) -> Result<RangeBatch> {
44		match *self {}
45	}
46
47	fn range_rev_next(
48		&self,
49		_table: EntryKind,
50		_cursor: &mut RangeCursor,
51		_start: Bound<&[u8]>,
52		_end: Bound<&[u8]>,
53		_version: CommitVersion,
54		_batch_size: usize,
55	) -> Result<RangeBatch> {
56		match *self {}
57	}
58
59	fn ensure_table(&self, _table: EntryKind) -> Result<()> {
60		match *self {}
61	}
62
63	fn clear_table(&self, _table: EntryKind) -> Result<()> {
64		match *self {}
65	}
66
67	fn drop(&self, _batches: HashMap<EntryKind, Vec<(CowVec<u8>, CommitVersion)>>) -> Result<()> {
68		match *self {}
69	}
70
71	fn get_all_versions(&self, _table: EntryKind, _key: &[u8]) -> Result<Vec<(CommitVersion, Option<CowVec<u8>>)>> {
72		match *self {}
73	}
74}
75
76impl TierBackend for WarmStorage {}