pub struct EllaContext { /* private fields */ }
Implementations§
Source§impl EllaContext
impl EllaContext
pub fn new(state: EllaState) -> Result<Self>
pub fn use_catalog<'a>(self, catalog: impl Into<Id<'a>>) -> Result<Self>
pub fn use_schema<'a>(self, schema: impl Into<Id<'a>>) -> Result<Self>
pub async fn query(&self, sql: impl AsRef<str>) -> Result<Lazy>
pub async fn execute(&self, sql: &str) -> Result<()>
pub async fn create_topic<'a>( &self, table: impl Into<TableRef<'a>>, info: impl Into<TopicInfo>, if_not_exists: bool, or_replace: bool, ) -> Result<Arc<EllaTopic>>
pub async fn create_view<'a>( &self, table: impl Into<TableRef<'a>>, info: impl Into<ViewInfo>, if_not_exists: bool, or_replace: bool, ) -> Result<Arc<EllaView>>
pub async fn create_table<'a>( &self, table: impl Into<TableRef<'a>>, info: impl Into<TableInfo>, if_not_exists: bool, or_replace: bool, ) -> Result<Arc<EllaTable>>
pub async fn create_schema<'a>( &self, schema: impl Into<SchemaRef<'a>>, if_not_exists: bool, ) -> Result<Arc<EllaSchema>>
pub async fn create_catalog<'a>( &self, catalog: impl Into<Id<'a>>, if_not_exists: bool, ) -> Result<Arc<EllaCatalog>>
pub fn table<'a>( &self, table: impl Into<TableRef<'a>>, ) -> Option<Arc<EllaTable>>
pub async fn shutdown(self) -> Result<()>
pub fn config(&self) -> &EllaConfig
pub fn cluster(&self) -> &Arc<EllaCluster>
pub fn default_catalog(&self) -> &Id<'static>
pub fn default_schema(&self) -> &Id<'static>
pub fn state(&self) -> &EllaState
Trait Implementations§
Source§impl Clone for EllaContext
impl Clone for EllaContext
Source§fn clone(&self) -> EllaContext
fn clone(&self) -> EllaContext
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for EllaContext
impl !RefUnwindSafe for EllaContext
impl Send for EllaContext
impl Sync for EllaContext
impl Unpin for EllaContext
impl !UnwindSafe for EllaContext
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> 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