reifydb_core/interface/catalog/
layout.rs1use super::{ringbuffer::RingBuffer, table::Table, view::View};
5use crate::encoded::schema::RowSchema;
6
7pub trait GetSchema {
8 fn get_schema(&self) -> RowSchema;
9}
10
11impl GetSchema for Table {
12 fn get_schema(&self) -> RowSchema {
13 RowSchema::from(&self.columns)
14 }
15}
16
17impl GetSchema for View {
18 fn get_schema(&self) -> RowSchema {
19 RowSchema::from(self.columns())
20 }
21}
22
23impl GetSchema for RingBuffer {
24 fn get_schema(&self) -> RowSchema {
25 RowSchema::from(&self.columns)
26 }
27}