Skip to main content

reifydb_core/interface/catalog/
table.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2026 ReifyDB
3
4use serde::{Deserialize, Serialize};
5
6use crate::interface::catalog::{
7	column::Column,
8	id::{NamespaceId, TableId},
9	key::PrimaryKey,
10};
11
12#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
13pub struct Table {
14	pub id: TableId,
15	pub namespace: NamespaceId,
16	pub name: String,
17	pub columns: Vec<Column>,
18	pub primary_key: Option<PrimaryKey>,
19	pub partition_by: Vec<String>,
20	pub underlying: bool,
21}
22
23impl Table {
24	pub fn name(&self) -> &str {
25		&self.name
26	}
27}