1use super::query_builder::MysqlQueryBuilder;
4use super::MysqlValue;
5use crate::backend::sql_dialect::on_conflict_clause::SupportsOnConflictClause;
6use crate::backend::*;
7use crate::internal::derives::multiconnection::sql_dialect;
8use crate::query_builder::bind_collector::RawBytesBindCollector;
9use crate::sql_types::TypeMetadata;
10
11#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Mysql {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "Mysql")
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for Mysql { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Mysql {
#[inline]
fn clone(&self) -> Mysql { *self }
}Clone, #[automatically_derived]
impl ::core::hash::Hash for Mysql {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {}
}Hash, #[automatically_derived]
impl ::core::cmp::PartialEq for Mysql {
#[inline]
fn eq(&self, other: &Mysql) -> bool { true }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Mysql {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) -> () {}
}Eq, #[automatically_derived]
impl ::core::default::Default for Mysql {
#[inline]
fn default() -> Mysql { Mysql {} }
}Default)]
13pub struct Mysql;
14
15#[allow(missing_debug_implementations)]
16#[derive(#[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::fmt::Debug for MysqlType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
MysqlType::Tiny => "Tiny",
MysqlType::UnsignedTiny => "UnsignedTiny",
MysqlType::Short => "Short",
MysqlType::UnsignedShort => "UnsignedShort",
MysqlType::Long => "Long",
MysqlType::UnsignedLong => "UnsignedLong",
MysqlType::LongLong => "LongLong",
MysqlType::UnsignedLongLong => "UnsignedLongLong",
MysqlType::Float => "Float",
MysqlType::Double => "Double",
MysqlType::Numeric => "Numeric",
MysqlType::Time => "Time",
MysqlType::Date => "Date",
MysqlType::DateTime => "DateTime",
MysqlType::Timestamp => "Timestamp",
MysqlType::String => "String",
MysqlType::Blob => "Blob",
MysqlType::Bit => "Bit",
MysqlType::Set => "Set",
MysqlType::Enum => "Enum",
})
}
}Debug, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::hash::Hash for MysqlType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::cmp::PartialEq for MysqlType {
#[inline]
fn eq(&self, other: &MysqlType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::cmp::Eq for MysqlType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) -> () {}
}Eq, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::clone::Clone for MysqlType {
#[inline]
fn clone(&self) -> MysqlType { *self }
}Clone, #[automatically_derived]
#[allow(missing_debug_implementations)]
impl ::core::marker::Copy for MysqlType { }Copy)]
19#[non_exhaustive]
20pub enum MysqlType {
21 Tiny,
23 UnsignedTiny,
25 Short,
27 UnsignedShort,
29 Long,
31 UnsignedLong,
33 LongLong,
35 UnsignedLongLong,
37 Float,
39 Double,
41 Numeric,
43 Time,
45 Date,
47 DateTime,
50 Timestamp,
53 String,
55 Blob,
57 Bit,
59 Set,
61 Enum,
63}
64
65impl Backend for Mysql {
66 type QueryBuilder = MysqlQueryBuilder;
67 type RawValue<'a> = MysqlValue<'a>;
68 type BindCollector<'a> = RawBytesBindCollector<Self>;
69}
70
71impl TypeMetadata for Mysql {
72 type TypeMetadata = MysqlType;
73 type MetadataLookup = ();
74}
75
76impl SqlDialect for Mysql {
77 type ReturningClause = sql_dialect::returning_clause::DoesNotSupportReturningClause;
78
79 type OnConflictClause = MysqlOnConflictClause;
80
81 type InsertWithDefaultKeyword = sql_dialect::default_keyword_for_insert::IsoSqlDefaultKeyword;
82 type BatchInsertSupport = sql_dialect::batch_insert_support::PostgresLikeBatchInsertSupport;
83 type DefaultValueClauseForInsert = MysqlStyleDefaultValueClause;
84
85 type EmptyFromClauseSyntax = sql_dialect::from_clause_syntax::AnsiSqlFromClauseSyntax;
86 type SelectStatementSyntax = sql_dialect::select_statement_syntax::AnsiSqlSelectStatement;
87
88 type ExistsSyntax = sql_dialect::exists_syntax::AnsiSqlExistsSyntax;
89 type ArrayComparison = sql_dialect::array_comparison::AnsiSqlArrayComparison;
90
91 type ConcatClause = MysqlConcatClause;
92 type AliasSyntax = sql_dialect::alias_syntax::AsAliasSyntax;
93
94 type WindowFrameClauseGroupSupport =
95 sql_dialect::window_frame_clause_group_support::NoGroupWindowFrameUnit;
96
97 type WindowFrameExclusionSupport =
98 sql_dialect::window_frame_exclusion_support::NoFrameFrameExclusionSupport;
99
100 type AggregateFunctionExpressions =
101 sql_dialect::aggregate_function_expressions::NoAggregateFunctionExpressions;
102
103 type BuiltInWindowFunctionRequireOrder = MysqlRequiresOrderForWindowFunctions;
104}
105
106impl DieselReserveSpecialization for Mysql {}
107impl TrustedBackend for Mysql {}
108
109#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MysqlStyleDefaultValueClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "MysqlStyleDefaultValueClause")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MysqlStyleDefaultValueClause {
#[inline]
fn clone(&self) -> MysqlStyleDefaultValueClause { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MysqlStyleDefaultValueClause { }Copy)]
110pub struct MysqlStyleDefaultValueClause;
111
112#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MysqlConcatClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "MysqlConcatClause")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MysqlConcatClause {
#[inline]
fn clone(&self) -> MysqlConcatClause { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MysqlConcatClause { }Copy)]
113pub struct MysqlConcatClause;
114
115#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MysqlOnConflictClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "MysqlOnConflictClause")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MysqlOnConflictClause {
#[inline]
fn clone(&self) -> MysqlOnConflictClause { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MysqlOnConflictClause { }Copy)]
116pub struct MysqlOnConflictClause;
117
118#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MysqlRequiresOrderForWindowFunctions {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
"MysqlRequiresOrderForWindowFunctions")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MysqlRequiresOrderForWindowFunctions {
#[inline]
fn clone(&self) -> MysqlRequiresOrderForWindowFunctions { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MysqlRequiresOrderForWindowFunctions { }Copy)]
119pub struct MysqlRequiresOrderForWindowFunctions;
120
121impl SupportsOnConflictClause for MysqlOnConflictClause {}