Skip to main content

Catalog

Struct Catalog 

Source
pub struct Catalog {
    pub schemas: HashMap<String, CatalogSchema>,
    pub holt_store: Arc<HoltStore>,
}

Fields§

§schemas: HashMap<String, CatalogSchema>§holt_store: Arc<HoltStore>

Implementations§

Source§

impl Catalog

Source

pub fn new(holt_store: Arc<HoltStore>) -> Self

Source

pub fn create_schema( &mut self, schema_name: impl Into<String>, ) -> QuillSQLResult<()>

Source

pub fn create_table( &mut self, table_ref: TableReference, schema: SchemaRef, ) -> QuillSQLResult<u64>

Source

pub fn drop_table(&mut self, table_ref: &TableReference) -> QuillSQLResult<bool>

Source

pub fn table_schema( &self, table_ref: &TableReference, ) -> QuillSQLResult<SchemaRef>

Source

pub fn table_id(&self, table_ref: &TableReference) -> QuillSQLResult<u64>

Source

pub fn table_statistics( &self, table_ref: &TableReference, ) -> Option<&TableStatistics>

Source

pub fn analyze_table( &mut self, table_ref: &TableReference, ) -> QuillSQLResult<TableStatistics>

Source

pub fn try_table_schema(&self, table_ref: &TableReference) -> Option<SchemaRef>

Source

pub fn table_indexes( &self, table_ref: &TableReference, ) -> QuillSQLResult<Vec<CatalogIndex>>

Source

pub fn create_index( &mut self, index_name: String, table_ref: &TableReference, key_schema: SchemaRef, ) -> QuillSQLResult<u64>

Source

pub fn drop_index( &mut self, table_ref: &TableReference, index_name: &str, ) -> QuillSQLResult<bool>

Source

pub fn find_index_owner( &self, catalog_hint: Option<&str>, schema_hint: Option<&str>, index_name: &str, ) -> Option<TableReference>

Source

pub fn load_schema(&mut self, name: impl Into<String>, schema: CatalogSchema)

Source

pub fn load_table( &mut self, table_ref: TableReference, table_name: impl Into<String>, schema: SchemaRef, table_id: u64, ) -> QuillSQLResult<()>

Source

pub fn load_index( &mut self, table_ref: TableReference, index_name: impl Into<String>, key_schema: SchemaRef, index_id: u64, ) -> QuillSQLResult<()>

Source

pub fn refresh_information_schema_projection(&self) -> QuillSQLResult<()>

Trait Implementations§

Source§

impl Debug for Catalog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.