pub struct OptimizeTableOption { /* private fields */ }Expand description
OPTIMIZE TABLE statement options (MySQL-only)
This struct represents options for the OPTIMIZE TABLE statement. OPTIMIZE TABLE reorganizes the physical storage of table data and associated index data.
§Examples
use reinhardt_query::types::maintenance::OptimizeTableOption;
// Basic OPTIMIZE TABLE
let opt = OptimizeTableOption::new();
// OPTIMIZE NO_WRITE_TO_BINLOG TABLE
let opt = OptimizeTableOption::new().no_write_to_binlog(true);
// OPTIMIZE LOCAL TABLE
let opt = OptimizeTableOption::new().local(true);Implementations§
Source§impl OptimizeTableOption
impl OptimizeTableOption
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new OPTIMIZE TABLE option
§Examples
use reinhardt_query::types::maintenance::OptimizeTableOption;
let opt = OptimizeTableOption::new();Sourcepub fn no_write_to_binlog(self, no_write_to_binlog: bool) -> Self
pub fn no_write_to_binlog(self, no_write_to_binlog: bool) -> Self
Set NO_WRITE_TO_BINLOG option
Suppresses binary logging for this operation (same as LOCAL).
§Examples
use reinhardt_query::types::maintenance::OptimizeTableOption;
let opt = OptimizeTableOption::new().no_write_to_binlog(true);Trait Implementations§
Source§impl Clone for OptimizeTableOption
impl Clone for OptimizeTableOption
Source§fn clone(&self) -> OptimizeTableOption
fn clone(&self) -> OptimizeTableOption
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 OptimizeTableOption
impl Debug for OptimizeTableOption
Source§impl Default for OptimizeTableOption
impl Default for OptimizeTableOption
Source§fn default() -> OptimizeTableOption
fn default() -> OptimizeTableOption
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OptimizeTableOption
impl RefUnwindSafe for OptimizeTableOption
impl Send for OptimizeTableOption
impl Sync for OptimizeTableOption
impl Unpin for OptimizeTableOption
impl UnsafeUnpin for OptimizeTableOption
impl UnwindSafe for OptimizeTableOption
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