pub struct ExplainStatement { /* private fields */ }Implementations§
Source§impl ExplainStatement
impl ExplainStatement
pub fn new() -> ExplainStatement
Sourcepub fn statement(
self,
statement: impl Into<ExplainableStatement>,
) -> ExplainStatement
pub fn statement( self, statement: impl Into<ExplainableStatement>, ) -> ExplainStatement
Set the statement to be explained.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn analyze(self) -> ExplainStatement
pub fn analyze(self) -> ExplainStatement
Set ANALYZE to true.
Sourcepub fn format(self, format: ExplainFormat) -> ExplainStatement
pub fn format(self, format: ExplainFormat) -> ExplainStatement
Set the output format.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn verbose(self, verbose: bool) -> ExplainStatement
pub fn verbose(self, verbose: bool) -> ExplainStatement
Set VERBOSE.
Sourcepub fn costs(self, costs: bool) -> ExplainStatement
pub fn costs(self, costs: bool) -> ExplainStatement
Set COSTS.
Sourcepub fn settings(self, settings: bool) -> ExplainStatement
pub fn settings(self, settings: bool) -> ExplainStatement
Set SETTINGS.
Sourcepub fn generic_plan(self, generic_plan: bool) -> ExplainStatement
pub fn generic_plan(self, generic_plan: bool) -> ExplainStatement
Set GENERIC_PLAN.
Sourcepub fn buffers(self, buffers: bool) -> ExplainStatement
pub fn buffers(self, buffers: bool) -> ExplainStatement
Set BUFFERS.
Sourcepub fn serialize_text(self) -> ExplainStatement
pub fn serialize_text(self) -> ExplainStatement
Set SERIALIZE TEXT.
Sourcepub fn serialize_binary(self) -> ExplainStatement
pub fn serialize_binary(self) -> ExplainStatement
Set SERIALIZE BINARY.
Sourcepub fn serialize_none(self) -> ExplainStatement
pub fn serialize_none(self) -> ExplainStatement
Set SERIALIZE NONE.
Sourcepub fn wal(self, wal: bool) -> ExplainStatement
pub fn wal(self, wal: bool) -> ExplainStatement
Set WAL.
Sourcepub fn timing(self, timing: bool) -> ExplainStatement
pub fn timing(self, timing: bool) -> ExplainStatement
Set TIMING.
Sourcepub fn summary(self, summary: bool) -> ExplainStatement
pub fn summary(self, summary: bool) -> ExplainStatement
Set SUMMARY.
Sourcepub fn memory(self, memory: bool) -> ExplainStatement
pub fn memory(self, memory: bool) -> ExplainStatement
Set MEMORY.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn table(table: impl IntoTableRef) -> ExplainStatement
pub fn table(table: impl IntoTableRef) -> ExplainStatement
Create a MySQL EXPLAIN for tbl_name [col_name | wild].
§Examples
use sea_query::{ExplainStatement, MysqlQueryBuilder};
assert_eq!(
ExplainStatement::table("glyph").to_string(MysqlQueryBuilder),
"EXPLAIN `glyph`"
);
assert_eq!(
ExplainStatement::table_with_column("glyph", "size").to_string(MysqlQueryBuilder),
"EXPLAIN `glyph` `size`"
);
assert_eq!(
ExplainStatement::table_with_wildcard("glyph", "size_%").to_string(MysqlQueryBuilder),
"EXPLAIN `glyph` 'size_%'"
);pub fn table_with_column( table: impl IntoTableRef, column: impl IntoIden, ) -> ExplainStatement
pub fn table_with_wildcard( table: impl IntoTableRef, wildcard: &'static str, ) -> ExplainStatement
Sourcepub fn into_variable(self, variable: impl Into<String>) -> ExplainStatement
pub fn into_variable(self, variable: impl Into<String>) -> ExplainStatement
Store the EXPLAIN output into a MySQL user variable.
Sourcepub fn column(self, column: impl IntoIden) -> ExplainStatement
pub fn column(self, column: impl IntoIden) -> ExplainStatement
Set the column name for EXPLAIN tbl_name col_name.
Sourcepub fn for_connection(self, id: u64) -> ExplainStatement
pub fn for_connection(self, id: u64) -> ExplainStatement
Explain a statement for a specific connection id.
Sourcepub fn for_schema(self, schema: impl IntoIden) -> ExplainStatement
pub fn for_schema(self, schema: impl IntoIden) -> ExplainStatement
Explain a statement for a specific schema.
Sourcepub fn for_database(self, database: impl IntoIden) -> ExplainStatement
pub fn for_database(self, database: impl IntoIden) -> ExplainStatement
Explain a statement for a specific database.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn query_plan(self) -> ExplainStatement
pub fn query_plan(self) -> ExplainStatement
Use EXPLAIN QUERY PLAN.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn build_collect_into(
&self,
query_builder: impl QueryBuilder,
sql: &mut impl SqlWriter,
)
pub fn build_collect_into( &self, query_builder: impl QueryBuilder, sql: &mut impl SqlWriter, )
Build SQL into the provided writer.
Sourcepub fn build_collect(
&self,
query_builder: impl QueryBuilder,
sql: &mut impl SqlWriter,
) -> String
pub fn build_collect( &self, query_builder: impl QueryBuilder, sql: &mut impl SqlWriter, ) -> String
Build SQL into the provided writer and return the resulting string.
Sourcepub fn build(&self, query_builder: impl QueryBuilder) -> (String, Values)
pub fn build(&self, query_builder: impl QueryBuilder) -> (String, Values)
Build SQL and collect values.
Sourcepub fn to_string(&self, query_builder: impl QueryBuilder) -> String
pub fn to_string(&self, query_builder: impl QueryBuilder) -> String
Build the SQL string.
Trait Implementations§
Source§impl Clone for ExplainStatement
impl Clone for ExplainStatement
Source§fn clone(&self) -> ExplainStatement
fn clone(&self) -> ExplainStatement
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 moreSource§impl Debug for ExplainStatement
impl Debug for ExplainStatement
Source§impl Default for ExplainStatement
impl Default for ExplainStatement
Source§fn default() -> ExplainStatement
fn default() -> ExplainStatement
Returns the “default value” for a type. Read more
Source§impl PartialEq for ExplainStatement
impl PartialEq for ExplainStatement
Source§fn eq(&self, other: &ExplainStatement) -> bool
fn eq(&self, other: &ExplainStatement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExplainStatement
Auto Trait Implementations§
impl Freeze for ExplainStatement
impl RefUnwindSafe for ExplainStatement
impl Send for ExplainStatement
impl Sync for ExplainStatement
impl Unpin for ExplainStatement
impl UnsafeUnpin for ExplainStatement
impl UnwindSafe for ExplainStatement
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more