pub struct FlushOrderer { /* private fields */ }Expand description
Builds a dependency graph and orders operations for flush.
Uses table foreign key relationships to determine correct ordering:
- Parents must be inserted before children
- Children must be deleted before parents
Implementations§
Source§impl FlushOrderer
impl FlushOrderer
Sourcepub fn register_model<T: Model>(&mut self)
pub fn register_model<T: Model>(&mut self)
Register a model type’s dependencies.
Extracts foreign key relationships from the model’s field metadata.
Sourcepub fn register_table(
&mut self,
table: &'static str,
depends_on: Vec<&'static str>,
)
pub fn register_table( &mut self, table: &'static str, depends_on: Vec<&'static str>, )
Register a table’s dependencies directly.
Trait Implementations§
Source§impl Debug for FlushOrderer
impl Debug for FlushOrderer
Source§impl Default for FlushOrderer
impl Default for FlushOrderer
Source§fn default() -> FlushOrderer
fn default() -> FlushOrderer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FlushOrderer
impl RefUnwindSafe for FlushOrderer
impl Send for FlushOrderer
impl Sync for FlushOrderer
impl Unpin for FlushOrderer
impl UnsafeUnpin for FlushOrderer
impl UnwindSafe for FlushOrderer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).