pub struct Catalog { /* private fields */ }
Implementations§
Source§impl Catalog
impl Catalog
pub fn new(spark_session: SparkSession) -> Self
Sourcepub async fn current_catalog(self) -> Result<String, SparkError>
pub async fn current_catalog(self) -> Result<String, SparkError>
Returns the current default catalog in this session
pub async fn set_current_catalog( self, catalog_name: &str, ) -> Result<(), SparkError>
Sourcepub async fn list_catalogs(
self,
pattern: Option<&str>,
) -> Result<RecordBatch, SparkError>
pub async fn list_catalogs( self, pattern: Option<&str>, ) -> Result<RecordBatch, SparkError>
Returns a list of catalogs in this session
Sourcepub async fn current_database(self) -> Result<String, SparkError>
pub async fn current_database(self) -> Result<String, SparkError>
Returns the current default database in this session
pub async fn set_current_database(self, db_name: &str) -> Result<(), SparkError>
Sourcepub async fn list_databases(
self,
pattern: Option<&str>,
) -> Result<RecordBatch, SparkError>
pub async fn list_databases( self, pattern: Option<&str>, ) -> Result<RecordBatch, SparkError>
Returns a list of databases in this session
pub async fn get_database( self, db_name: &str, ) -> Result<RecordBatch, SparkError>
pub async fn database_exists(self, db_name: &str) -> Result<bool, SparkError>
Sourcepub async fn list_tables(
self,
pattern: Option<&str>,
db_name: Option<&str>,
) -> Result<RecordBatch, SparkError>
pub async fn list_tables( self, pattern: Option<&str>, db_name: Option<&str>, ) -> Result<RecordBatch, SparkError>
Returns a list of tables/views in the specific database
pub async fn get_table( self, table_name: &str, ) -> Result<RecordBatch, SparkError>
pub async fn list_functions( self, db_name: Option<&str>, pattern: Option<&str>, ) -> Result<RecordBatch, SparkError>
pub async fn function_exists( self, function_name: &str, db_name: Option<&str>, ) -> Result<bool, SparkError>
pub async fn get_function( self, function_name: &str, ) -> Result<RecordBatch, SparkError>
Sourcepub async fn list_columns(
self,
table_name: &str,
db_name: Option<&str>,
) -> Result<RecordBatch, SparkError>
pub async fn list_columns( self, table_name: &str, db_name: Option<&str>, ) -> Result<RecordBatch, SparkError>
Returns a list of columns for the given tables/views in the specific database
pub async fn table_exists( self, table_name: &str, db_name: Option<&str>, ) -> Result<bool, SparkError>
pub async fn drop_temp_view(self, view_name: &str) -> Result<bool, SparkError>
pub async fn drop_global_temp_view( self, view_name: &str, ) -> Result<bool, SparkError>
pub async fn is_cached(self, table_name: &str) -> Result<bool, SparkError>
pub async fn cache_table( self, table_name: &str, storage_level: Option<StorageLevel>, ) -> Result<(), SparkError>
pub async fn uncache_table(self, table_name: &str) -> Result<(), SparkError>
pub async fn clear_cache(self) -> Result<(), SparkError>
pub async fn refresh_table(self, table_name: &str) -> Result<(), SparkError>
pub async fn recover_partitions( self, table_name: &str, ) -> Result<(), SparkError>
pub async fn refresh_by_path(self, path: &str) -> Result<(), SparkError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Catalog
impl !RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl !UnwindSafe for Catalog
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request