Skip to main content

reifydb_core/interface/catalog/
config.rs

1// SPDX-License-Identifier: AGPL-3.0-or-later
2// Copyright (c) 2025 ReifyDB
3
4use reifydb_type::value::Value;
5
6/// A configuration definition for a runtime-tunable database setting.
7///
8/// `value` is the currently active value (either the persisted override or the default).
9/// `default_value`, `description`, and `requires_restart` are compile-time constants
10/// provided at registration time — they are never stored to disk.
11#[derive(Debug, Clone)]
12pub struct ConfigDef {
13	/// SCREAMING_SNAKE_CASE key, e.g. "ORACLE_WINDOW_SIZE"
14	pub key: String,
15	/// Currently active value (persisted override or default)
16	pub value: Value,
17	/// Compile-time default value
18	pub default_value: Value,
19	/// Human-readable description
20	pub description: &'static str,
21	/// Whether changing this setting requires a database restart
22	pub requires_restart: bool,
23}