pub struct StatementAnalysis {
pub statement_preview: String,
pub lock_level: LockLevel,
pub affected_table: Option<String>,
pub table_size: Option<TableSize>,
pub estimated_rows: Option<i64>,
pub verdict: SafetyVerdict,
pub suggestions: Vec<String>,
pub data_loss: bool,
}Expand description
Safety analysis for a single SQL statement within a migration.
Fields§
§statement_preview: StringA short preview of the analyzed statement.
lock_level: LockLevelThe PostgreSQL lock level this statement acquires.
affected_table: Option<String>The table affected by this statement, if identifiable.
table_size: Option<TableSize>Estimated table size classification, if known.
estimated_rows: Option<i64>Estimated live row count, if available from statistics.
verdict: SafetyVerdictThe safety verdict for this statement.
suggestions: Vec<String>Actionable suggestions for reducing risk.
data_loss: boolWhether this statement causes irreversible data loss.
Trait Implementations§
Source§impl Clone for StatementAnalysis
impl Clone for StatementAnalysis
Source§fn clone(&self) -> StatementAnalysis
fn clone(&self) -> StatementAnalysis
Returns a duplicate of the value. Read more
1.0.0 · 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 StatementAnalysis
impl Debug for StatementAnalysis
Auto Trait Implementations§
impl Freeze for StatementAnalysis
impl RefUnwindSafe for StatementAnalysis
impl Send for StatementAnalysis
impl Sync for StatementAnalysis
impl Unpin for StatementAnalysis
impl UnsafeUnpin for StatementAnalysis
impl UnwindSafe for StatementAnalysis
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