Trait mz_sql::session::metadata::SessionMetadata
source · pub trait SessionMetadata: Debug + Sync {
// Required methods
fn vars(&self) -> &SessionVars;
fn conn_id(&self) -> &ConnectionId;
fn client_ip(&self) -> Option<&IpAddr>;
fn pcx(&self) -> &PlanContext;
fn role_metadata(&self) -> &RoleMetadata;
// Provided methods
fn current_role_id(&self) -> &RoleId { ... }
fn session_role_id(&self) -> &RoleId { ... }
fn user(&self) -> &User { ... }
fn database(&self) -> &str { ... }
fn search_path(&self) -> &[Ident] { ... }
fn is_superuser(&self) -> bool { ... }
fn enable_session_rbac_checks(&self) -> bool { ... }
}
Required Methods§
sourcefn vars(&self) -> &SessionVars
fn vars(&self) -> &SessionVars
Returns the session vars for this session.
sourcefn conn_id(&self) -> &ConnectionId
fn conn_id(&self) -> &ConnectionId
Returns the connection ID associated with the session.
sourcefn pcx(&self) -> &PlanContext
fn pcx(&self) -> &PlanContext
Returns the current transaction’s PlanContext. Panics if there is not a current transaction.
sourcefn role_metadata(&self) -> &RoleMetadata
fn role_metadata(&self) -> &RoleMetadata
Returns the role metadata for this session.