pub struct CheckTableStatement { /* private fields */ }Expand description
CHECK TABLE statement builder
This struct provides a fluent API for constructing CHECK TABLE queries. CHECK TABLE checks a table or tables for errors.
MySQL-only: Other backends will panic with a helpful error message.
§Examples
use reinhardt_query::prelude::*;
use reinhardt_query::types::CheckTableOption;
// CHECK TABLE users
let query = Query::check_table()
.table("users");
// CHECK TABLE users QUICK
let query = Query::check_table()
.table("users")
.option(CheckTableOption::Quick);
// CHECK TABLE users, posts EXTENDED
let query = Query::check_table()
.table("users")
.table("posts")
.option(CheckTableOption::Extended);Implementations§
Source§impl CheckTableStatement
impl CheckTableStatement
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CHECK TABLE statement
§Examples
use reinhardt_query::prelude::*;
let query = Query::check_table();Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Take the ownership of data in the current CheckTableStatement
Sourcepub fn table<T>(&mut self, table: T) -> &mut Selfwhere
T: IntoIden,
pub fn table<T>(&mut self, table: T) -> &mut Selfwhere
T: IntoIden,
Add a table to check
§Examples
use reinhardt_query::prelude::*;
let query = Query::check_table()
.table("users");Sourcepub fn option(&mut self, option: CheckTableOption) -> &mut Self
pub fn option(&mut self, option: CheckTableOption) -> &mut Self
Set check option
§Examples
use reinhardt_query::prelude::*;
use reinhardt_query::types::CheckTableOption;
let query = Query::check_table()
.table("users")
.option(CheckTableOption::Quick);Trait Implementations§
Source§impl Clone for CheckTableStatement
impl Clone for CheckTableStatement
Source§fn clone(&self) -> CheckTableStatement
fn clone(&self) -> CheckTableStatement
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 CheckTableStatement
impl Debug for CheckTableStatement
Source§impl Default for CheckTableStatement
impl Default for CheckTableStatement
Source§impl QueryStatementBuilder for CheckTableStatement
impl QueryStatementBuilder for CheckTableStatement
Source§fn build_any(&self, query_builder: &dyn QueryBuilderTrait) -> (String, Values)
fn build_any(&self, query_builder: &dyn QueryBuilderTrait) -> (String, Values)
Build SQL statement for a database backend and collect query parameters Read more
impl QueryStatementWriter for CheckTableStatement
Auto Trait Implementations§
impl Freeze for CheckTableStatement
impl !RefUnwindSafe for CheckTableStatement
impl !Send for CheckTableStatement
impl !Sync for CheckTableStatement
impl Unpin for CheckTableStatement
impl UnsafeUnpin for CheckTableStatement
impl !UnwindSafe for CheckTableStatement
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