pub enum BatchStrategy {
In,
Join,
Subquery,
}Expand description
批量抓取策略
Variants§
In
使用 WHERE id IN (?, ?, ...) 子句批量加载
适用场景:关联数量较少、目标表无索引时的备选方案
Join
使用 LEFT JOIN 一次性加载所有关联
适用场景:关联数量较少、需要原子性读取
Subquery
使用 WHERE id IN (SELECT ... FROM ...) 子查询批量加载
适用场景:子查询可被数据库优化器优化时
Implementations§
Trait Implementations§
Source§impl Clone for BatchStrategy
impl Clone for BatchStrategy
Source§fn clone(&self) -> BatchStrategy
fn clone(&self) -> BatchStrategy
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 moreimpl Copy for BatchStrategy
Source§impl Debug for BatchStrategy
impl Debug for BatchStrategy
Source§impl Default for BatchStrategy
impl Default for BatchStrategy
Source§fn default() -> BatchStrategy
fn default() -> BatchStrategy
Returns the “default value” for a type. Read more
impl Eq for BatchStrategy
Source§impl Hash for BatchStrategy
impl Hash for BatchStrategy
Source§impl PartialEq for BatchStrategy
impl PartialEq for BatchStrategy
impl StructuralPartialEq for BatchStrategy
Auto Trait Implementations§
impl Freeze for BatchStrategy
impl RefUnwindSafe for BatchStrategy
impl Send for BatchStrategy
impl Sync for BatchStrategy
impl Unpin for BatchStrategy
impl UnsafeUnpin for BatchStrategy
impl UnwindSafe for BatchStrategy
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