pub struct PlanCacheEntry {
pub ast: Option<Arc<Statement>>,
pub analysis: Option<Arc<String>>,
pub created_at: Instant,
pub tables: Vec<String>,
pub ttl: Option<Duration>,
}Expand description
查询计划缓存条目
存储解析后的 AST 和/或优化后的查询分析结果。
Fields§
§ast: Option<Arc<Statement>>解析后的 AST(parse_cache 条目)
analysis: Option<Arc<String>>优化后的查询分析(optimize_cache 条目)
created_at: Instant创建时间
tables: Vec<String>依赖的表名列表(用于表级失效)
ttl: Option<Duration>TTL(可选,过期自动失效)
Implementations§
Source§impl PlanCacheEntry
impl PlanCacheEntry
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
检查条目是否已过期
Auto Trait Implementations§
impl Freeze for PlanCacheEntry
impl RefUnwindSafe for PlanCacheEntry
impl Send for PlanCacheEntry
impl Sync for PlanCacheEntry
impl Unpin for PlanCacheEntry
impl UnsafeUnpin for PlanCacheEntry
impl UnwindSafe for PlanCacheEntry
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> 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