pub struct PostgresSessionSpec {
pub plan_cache_mode: Option<PlanCacheMode>,
pub jit: Option<bool>,
pub application_name: Option<String>,
}Expand description
PostgreSQL 连接级 session 初始化配置(稳定执行计划用)。
对应 [provider.sqldb.postgres_session];仅 kind = "postgres" 生效,
其他 kind 配置该字段会在 SqlProviderSpec::validate_specs 被拒绝。
未配置(None)时保持默认行为;每一项 None 表示该项不下发。
不提供任意 after_connect_sql 入口。
Fields§
§plan_cache_mode: Option<PlanCacheMode>§jit: Option<bool>None = 不下发 SET jit(保持数据库默认)。
application_name: Option<String>None = 不下发 SET application_name。长度 ≤ 63 字节(PG NAMEDATALEN-1),无控制字符。
Trait Implementations§
Source§impl Clone for PostgresSessionSpec
impl Clone for PostgresSessionSpec
Source§fn clone(&self) -> PostgresSessionSpec
fn clone(&self) -> PostgresSessionSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgresSessionSpec
impl Debug for PostgresSessionSpec
Source§impl Default for PostgresSessionSpec
impl Default for PostgresSessionSpec
Source§fn default() -> PostgresSessionSpec
fn default() -> PostgresSessionSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PostgresSessionSpec
impl<'de> Deserialize<'de> for PostgresSessionSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PostgresSessionSpec
impl PartialEq for PostgresSessionSpec
impl StructuralPartialEq for PostgresSessionSpec
Auto Trait Implementations§
impl Freeze for PostgresSessionSpec
impl RefUnwindSafe for PostgresSessionSpec
impl Send for PostgresSessionSpec
impl Sync for PostgresSessionSpec
impl Unpin for PostgresSessionSpec
impl UnsafeUnpin for PostgresSessionSpec
impl UnwindSafe for PostgresSessionSpec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DebugAny for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> EnvTomlLoad<T> for Twhere
T: DeserializeOwned,
impl<T> EnvTomlLoad<T> for Twhere
T: DeserializeOwned,
fn env_load_toml( path: &Path, dict: &ValueDict, ) -> Result<T, StructError<ConfIOReason>>
fn env_parse_toml( content: &str, dict: &ValueDict, ) -> Result<T, StructError<ConfIOReason>>
Source§impl<T> EnvYamlLoad<T> for Twhere
T: DeserializeOwned,
impl<T> EnvYamlLoad<T> for Twhere
T: DeserializeOwned,
fn env_load_yaml( path: &Path, dict: &ValueDict, ) -> Result<T, StructError<ConfIOReason>>
fn env_parse_yaml( content: &str, dict: &ValueDict, ) -> Result<T, StructError<ConfIOReason>>
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