pub struct ExplainStatement { /* private fields */ }Implementations§
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn analyze(self) -> Self
Available on crate features backend-mysql or backend-postgres only.
pub fn analyze(self) -> Self
backend-mysql or backend-postgres only.Set ANALYZE to true.
Sourcepub fn format(self, format: ExplainFormat) -> Self
Available on crate features backend-mysql or backend-postgres only.
pub fn format(self, format: ExplainFormat) -> Self
backend-mysql or backend-postgres only.Set the output format.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn verbose(self, verbose: bool) -> Self
Available on crate feature backend-postgres only.
pub fn verbose(self, verbose: bool) -> Self
backend-postgres only.Set VERBOSE.
Sourcepub fn costs(self, costs: bool) -> Self
Available on crate feature backend-postgres only.
pub fn costs(self, costs: bool) -> Self
backend-postgres only.Set COSTS.
Sourcepub fn settings(self, settings: bool) -> Self
Available on crate feature backend-postgres only.
pub fn settings(self, settings: bool) -> Self
backend-postgres only.Set SETTINGS.
Sourcepub fn generic_plan(self, generic_plan: bool) -> Self
Available on crate feature backend-postgres only.
pub fn generic_plan(self, generic_plan: bool) -> Self
backend-postgres only.Set GENERIC_PLAN.
Sourcepub fn buffers(self, buffers: bool) -> Self
Available on crate feature backend-postgres only.
pub fn buffers(self, buffers: bool) -> Self
backend-postgres only.Set BUFFERS.
Sourcepub fn serialize_text(self) -> Self
Available on crate feature backend-postgres only.
pub fn serialize_text(self) -> Self
backend-postgres only.Set SERIALIZE TEXT.
Sourcepub fn serialize_binary(self) -> Self
Available on crate feature backend-postgres only.
pub fn serialize_binary(self) -> Self
backend-postgres only.Set SERIALIZE BINARY.
Sourcepub fn serialize_none(self) -> Self
Available on crate feature backend-postgres only.
pub fn serialize_none(self) -> Self
backend-postgres only.Set SERIALIZE NONE.
Sourcepub fn timing(self, timing: bool) -> Self
Available on crate feature backend-postgres only.
pub fn timing(self, timing: bool) -> Self
backend-postgres only.Set TIMING.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn table(table: impl IntoTableRef) -> Self
Available on crate feature backend-mysql only.
pub fn table(table: impl IntoTableRef) -> Self
backend-mysql only.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, ) -> Self
Available on crate feature
backend-mysql only.pub fn table_with_wildcard( table: impl IntoTableRef, wildcard: &'static str, ) -> Self
Available on crate feature
backend-mysql only.Sourcepub fn into_variable(self, variable: impl Into<String>) -> Self
Available on crate feature backend-mysql only.
pub fn into_variable(self, variable: impl Into<String>) -> Self
backend-mysql only.Store the EXPLAIN output into a MySQL user variable.
Sourcepub fn column(self, column: impl IntoIden) -> Self
Available on crate feature backend-mysql only.
pub fn column(self, column: impl IntoIden) -> Self
backend-mysql only.Set the column name for EXPLAIN tbl_name col_name.
Sourcepub fn for_connection(self, id: u64) -> Self
Available on crate feature backend-mysql only.
pub fn for_connection(self, id: u64) -> Self
backend-mysql only.Explain a statement for a specific connection id.
Sourcepub fn for_schema(self, schema: impl IntoIden) -> Self
Available on crate feature backend-mysql only.
pub fn for_schema(self, schema: impl IntoIden) -> Self
backend-mysql only.Explain a statement for a specific schema.
Sourcepub fn for_database(self, database: impl IntoIden) -> Self
Available on crate feature backend-mysql only.
pub fn for_database(self, database: impl IntoIden) -> Self
backend-mysql only.Explain a statement for a specific database.
Source§impl ExplainStatement
impl ExplainStatement
Sourcepub fn query_plan(self) -> Self
Available on crate feature backend-sqlite only.
pub fn query_plan(self) -> Self
backend-sqlite only.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