pub struct CatalogEntry {
pub name: String,
pub entry_type: CatalogEntryType,
pub schema: Option<SochSchema>,
pub input_schema: Option<SochSchema>,
pub output_schema: Option<SochSchema>,
pub implementation: Option<OperationImpl>,
pub description: Option<String>,
pub root_id: u64,
pub created_us: u64,
pub modified_us: u64,
pub row_count: u64,
pub metadata: HashMap<String, String>,
}Expand description
A catalog entry (table, index, operation, etc.)
Fields§
§name: StringEntry name
entry_type: CatalogEntryTypeEntry type
schema: Option<SochSchema>Schema definition (for tables)
input_schema: Option<SochSchema>Input schema (for operations)
output_schema: Option<SochSchema>Output schema (for operations)
implementation: Option<OperationImpl>Operation implementation (for operations)
description: Option<String>Description (for MCP tool generation)
root_id: u64Root page/block ID for data storage
created_us: u64Creation timestamp
modified_us: u64Last modified timestamp
row_count: u64Row count estimate
metadata: HashMap<String, String>Additional metadata
Implementations§
Source§impl CatalogEntry
impl CatalogEntry
pub fn new_table( name: impl Into<String>, schema: SochSchema, root_id: u64, ) -> Self
pub fn new_index( name: impl Into<String>, table_name: impl Into<String>, fields: Vec<String>, unique: bool, root_id: u64, ) -> Self
Sourcepub fn new_operation(
name: impl Into<String>,
input_schema: SochSchema,
output_schema: SochSchema,
implementation: OperationImpl,
description: impl Into<String>,
) -> Self
pub fn new_operation( name: impl Into<String>, input_schema: SochSchema, output_schema: SochSchema, implementation: OperationImpl, description: impl Into<String>, ) -> Self
Create a new operation entry (Task 7: MCP Integration)
Sourcepub fn to_mcp_tool(&self) -> Option<McpToolDescriptor>
pub fn to_mcp_tool(&self) -> Option<McpToolDescriptor>
Generate MCP tool descriptor from operation entry
Trait Implementations§
Source§impl Clone for CatalogEntry
impl Clone for CatalogEntry
Source§fn clone(&self) -> CatalogEntry
fn clone(&self) -> CatalogEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CatalogEntry
impl Debug for CatalogEntry
Source§impl<'de> Deserialize<'de> for CatalogEntry
impl<'de> Deserialize<'de> for CatalogEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CatalogEntry
impl RefUnwindSafe for CatalogEntry
impl Send for CatalogEntry
impl Sync for CatalogEntry
impl Unpin for CatalogEntry
impl UnwindSafe for CatalogEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more