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§

source

fn vars(&self) -> &SessionVars

Returns the session vars for this session.

source

fn conn_id(&self) -> &ConnectionId

Returns the connection ID associated with the session.

source

fn client_ip(&self) -> Option<&IpAddr>

Returns the client address associated with the session.

source

fn pcx(&self) -> &PlanContext

Returns the current transaction’s PlanContext. Panics if there is not a current transaction.

source

fn role_metadata(&self) -> &RoleMetadata

Returns the role metadata for this session.

Provided Methods§

source

fn current_role_id(&self) -> &RoleId

Returns the session’s current role ID.

§Panics

If the session has not connected successfully.

source

fn session_role_id(&self) -> &RoleId

Returns the session’s session role ID.

§Panics

If the session has not connected successfully.

source

fn user(&self) -> &User

source

fn database(&self) -> &str

source

fn search_path(&self) -> &[Ident]

source

fn is_superuser(&self) -> bool

source

fn enable_session_rbac_checks(&self) -> bool

Implementors§