Struct mz_coord::catalog::ConnCatalog
source · [−]pub struct ConnCatalog<'a> {
state: Cow<'a, CatalogState>,
conn_id: u32,
compute_instance: String,
database: Option<DatabaseId>,
search_path: Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>,
user: String,
prepared_statements: Option<Cow<'a, HashMap<String, PreparedStatement>>>,
}
Fields
state: Cow<'a, CatalogState>
conn_id: u32
compute_instance: String
database: Option<DatabaseId>
search_path: Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>
user: String
prepared_statements: Option<Cow<'a, HashMap<String, PreparedStatement>>>
Implementations
sourceimpl ConnCatalog<'_>
impl ConnCatalog<'_>
pub fn conn_id(&self) -> u32
pub fn state(&self) -> &CatalogState
pub fn into_owned(self) -> ConnCatalog<'static>
fn effective_search_path(
&self,
include_temp_schema: bool
) -> Vec<(ResolvedDatabaseSpecifier, SchemaSpecifier)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
sourceimpl ConnCatalog<'_>
impl ConnCatalog<'_>
fn resolve_item_name(
&self,
name: &PartialObjectName
) -> Result<&QualifiedObjectName, SqlCatalogError>
sourcefn minimal_qualification(
&self,
qualified_name: &QualifiedObjectName
) -> PartialObjectName
fn minimal_qualification(
&self,
qualified_name: &QualifiedObjectName
) -> PartialObjectName
returns a PartialObjectName
with the minimum amount of qualifiers to unambiguously resolve
the object.
Trait Implementations
sourceimpl<'a> Debug for ConnCatalog<'a>
impl<'a> Debug for ConnCatalog<'a>
sourceimpl ExprHumanizer for ConnCatalog<'_>
impl ExprHumanizer for ConnCatalog<'_>
sourcefn humanize_id(&self, id: GlobalId) -> Option<String>
fn humanize_id(&self, id: GlobalId) -> Option<String>
Attempts to return the a human-readable string for the relation
identified by id
. Read more
sourcefn humanize_scalar_type(&self, typ: &ScalarType) -> String
fn humanize_scalar_type(&self, typ: &ScalarType) -> String
Returns a human-readable name for the specified scalar type.
sourcefn humanize_column_type(&self, typ: &ColumnType) -> String
fn humanize_column_type(&self, typ: &ColumnType) -> String
Returns a human-readable name for the specified scalar type.
sourceimpl SessionCatalog for ConnCatalog<'_>
impl SessionCatalog for ConnCatalog<'_>
sourcefn active_user(&self) -> &str
fn active_user(&self) -> &str
Returns the name of the user who is issuing the query.
sourcefn get_prepared_statement_desc(&self, name: &str) -> Option<&StatementDesc>
fn get_prepared_statement_desc(&self, name: &str) -> Option<&StatementDesc>
Returns the descriptor of the named prepared statement on the session, or None if the prepared statement does not exist. Read more
sourcefn active_database(&self) -> Option<&DatabaseId>
fn active_database(&self) -> Option<&DatabaseId>
Returns the database to use if one is not explicitly specified.
sourcefn active_compute_instance(&self) -> &str
fn active_compute_instance(&self) -> &str
Returns the compute instance to use if one is not explicitly specified.
sourcefn resolve_database(
&self,
database_name: &str
) -> Result<&dyn CatalogDatabase, SqlCatalogError>
fn resolve_database(
&self,
database_name: &str
) -> Result<&dyn CatalogDatabase, SqlCatalogError>
Resolves the named database. Read more
sourcefn get_database(&self, id: &DatabaseId) -> &dyn CatalogDatabase
fn get_database(&self, id: &DatabaseId) -> &dyn CatalogDatabase
Gets a database by its ID. Read more
sourcefn resolve_schema(
&self,
database_name: Option<&str>,
schema_name: &str
) -> Result<&dyn CatalogSchema, SqlCatalogError>
fn resolve_schema(
&self,
database_name: Option<&str>,
schema_name: &str
) -> Result<&dyn CatalogSchema, SqlCatalogError>
Resolves a partially-specified schema name. Read more
sourcefn resolve_schema_in_database(
&self,
database_spec: &ResolvedDatabaseSpecifier,
schema_name: &str
) -> Result<&dyn CatalogSchema, SqlCatalogError>
fn resolve_schema_in_database(
&self,
database_spec: &ResolvedDatabaseSpecifier,
schema_name: &str
) -> Result<&dyn CatalogSchema, SqlCatalogError>
Resolves a schema name within a specified database. Read more
sourcefn get_schema(
&self,
database_spec: &ResolvedDatabaseSpecifier,
schema_spec: &SchemaSpecifier
) -> &dyn CatalogSchema
fn get_schema(
&self,
database_spec: &ResolvedDatabaseSpecifier,
schema_spec: &SchemaSpecifier
) -> &dyn CatalogSchema
Gets a schema by its ID. Read more
sourcefn is_system_schema(&self, schema: &str) -> bool
fn is_system_schema(&self, schema: &str) -> bool
Returns true if schema
is an internal system schema, false otherwise
sourcefn resolve_role(
&self,
role_name: &str
) -> Result<&dyn CatalogRole, SqlCatalogError>
fn resolve_role(
&self,
role_name: &str
) -> Result<&dyn CatalogRole, SqlCatalogError>
Resolves the named role.
sourcefn resolve_compute_instance(
&self,
compute_instance_name: Option<&str>
) -> Result<&dyn CatalogComputeInstance<'_>, SqlCatalogError>
fn resolve_compute_instance(
&self,
compute_instance_name: Option<&str>
) -> Result<&dyn CatalogComputeInstance<'_>, SqlCatalogError>
Resolves the named compute instance. Read more
sourcefn resolve_item(
&self,
name: &PartialObjectName
) -> Result<&dyn CatalogItem, SqlCatalogError>
fn resolve_item(
&self,
name: &PartialObjectName
) -> Result<&dyn CatalogItem, SqlCatalogError>
Resolves a partially-specified item name. Read more
sourcefn resolve_function(
&self,
name: &PartialObjectName
) -> Result<&dyn CatalogItem, SqlCatalogError>
fn resolve_function(
&self,
name: &PartialObjectName
) -> Result<&dyn CatalogItem, SqlCatalogError>
Performs the same operation as SessionCatalog::resolve_item
but for
functions within the catalog. Read more
sourcefn try_get_item(&self, id: &GlobalId) -> Option<&dyn CatalogItem>
fn try_get_item(&self, id: &GlobalId) -> Option<&dyn CatalogItem>
Gets an item by its ID.
sourcefn get_item(&self, id: &GlobalId) -> &dyn CatalogItem
fn get_item(&self, id: &GlobalId) -> &dyn CatalogItem
Gets an item by its ID. Read more
sourcefn item_exists(&self, name: &QualifiedObjectName) -> bool
fn item_exists(&self, name: &QualifiedObjectName) -> bool
Reports whether the specified type exists in the catalog.
sourcefn find_available_name(&self, name: QualifiedObjectName) -> QualifiedObjectName
fn find_available_name(&self, name: QualifiedObjectName) -> QualifiedObjectName
Finds a name like name
that is not already in use. Read more
sourcefn resolve_full_name(&self, name: &QualifiedObjectName) -> FullObjectName
fn resolve_full_name(&self, name: &QualifiedObjectName) -> FullObjectName
Returns a fully qualified human readable name from fully qualified non-human readable name
sourcefn config(&self) -> &CatalogConfig
fn config(&self) -> &CatalogConfig
Returns the configuration of the catalog.
sourcefn now(&self) -> EpochMillis
fn now(&self) -> EpochMillis
Returns the number of milliseconds since the system epoch. For normal use this means the Unix epoch. This can safely be mocked in tests and start at 0. Read more
sourcefn active_database_name(&self) -> Option<&str>
fn active_database_name(&self) -> Option<&str>
Returns the database to use if one is not explicitly specified.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ConnCatalog<'a>
impl<'a> Send for ConnCatalog<'a>
impl<'a> Sync for ConnCatalog<'a>
impl<'a> Unpin for ConnCatalog<'a>
impl<'a> !UnwindSafe for ConnCatalog<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<P, R> ProtoType<R> for P where
R: RustType<P>,
impl<P, R> ProtoType<R> for P where
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See RustType::from_proto
.
sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See RustType::into_proto
.
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more