Skip to main content

reifydb_store_multi/cold/
mod.rs

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