1use super::MysqlValue;
4use super::query_builder::MysqlQueryBuilder;
5use crate::backend::sql_dialect::batch_update_support::SupportsBatchUpdate;
6use crate::backend::sql_dialect::on_conflict_clause::SupportsOnConflictClause;
7use crate::backend::*;
8use crate::internal::derives::multiconnection::sql_dialect;
9use crate::query_builder::bind_collector::RawBytesBindCollector;
10use crate::sql_types::TypeMetadata;
11
12#[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_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::default::Default for Mysql {
#[inline]
fn default() -> Mysql { Mysql {} }
}Default)]
14pub struct Mysql;
15
16#[allow(missing_debug_implementations)]
17#[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 {
const __NAMES: &str =
"TinyUnsignedTinyShortUnsignedShortLongUnsignedLongLongLongUnsignedLongLongFloatDoubleNumericTimeDateDateTimeTimestampStringBlobBitSetEnum";
const __OFFSET: [usize; 21] =
[0usize, 4usize, 16usize, 21usize, 34usize, 38usize, 50usize,
58usize, 74usize, 79usize, 85usize, 92usize, 96usize,
100usize, 108usize, 117usize, 123usize, 127usize, 130usize,
133usize, 137usize];
let __d = ::core::intrinsics::discriminant_value(self) as usize;
::core::fmt::Formatter::debug_c_like_enum_write_str(f, __NAMES,
&__OFFSET, __d)
}
}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_fields_are_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)]
20#[non_exhaustive]
21pub enum MysqlType {
22 Tiny,
24 UnsignedTiny,
26 Short,
28 UnsignedShort,
30 Long,
32 UnsignedLong,
34 LongLong,
36 UnsignedLongLong,
38 Float,
40 Double,
42 Numeric,
44 Time,
46 Date,
48 DateTime,
51 Timestamp,
54 String,
56 Blob,
58 Bit,
60 Set,
62 Enum,
64}
65
66impl Backend for Mysql {
67 type QueryBuilder = MysqlQueryBuilder;
68 type RawValue<'a> = MysqlValue<'a>;
69 type BindCollector<'a> = RawBytesBindCollector<Self>;
70}
71
72impl TypeMetadata for Mysql {
73 type TypeMetadata = MysqlType;
74 type MetadataLookup = ();
75}
76
77impl SqlDialect for Mysql {
78 type ReturningClause = sql_dialect::returning_clause::DoesNotSupportReturningClause;
79
80 type OnConflictClause = MysqlOnConflictClause;
81
82 type InsertWithDefaultKeyword = sql_dialect::default_keyword_for_insert::IsoSqlDefaultKeyword;
83 type BatchInsertSupport = sql_dialect::batch_insert_support::PostgresLikeBatchInsertSupport;
84 type DefaultValueClauseForInsert = MysqlStyleDefaultValueClause;
85
86 type BatchUpdateSupport = MySqlLikeBatchUpdateSupport;
87
88 type EmptyFromClauseSyntax = sql_dialect::from_clause_syntax::AnsiSqlFromClauseSyntax;
89 type SelectStatementSyntax = sql_dialect::select_statement_syntax::AnsiSqlSelectStatement;
90
91 type ExistsSyntax = sql_dialect::exists_syntax::AnsiSqlExistsSyntax;
92 type ArrayComparison = sql_dialect::array_comparison::AnsiSqlArrayComparison;
93
94 type ConcatClause = MysqlConcatClause;
95 type AliasSyntax = sql_dialect::alias_syntax::AsAliasSyntax;
96
97 type WindowFrameClauseGroupSupport =
98 sql_dialect::window_frame_clause_group_support::NoGroupWindowFrameUnit;
99
100 type WindowFrameExclusionSupport =
101 sql_dialect::window_frame_exclusion_support::NoFrameFrameExclusionSupport;
102
103 type AggregateFunctionExpressions =
104 sql_dialect::aggregate_function_expressions::NoAggregateFunctionExpressions;
105
106 type BuiltInWindowFunctionRequireOrder = MysqlRequiresOrderForWindowFunctions;
107}
108
109impl DieselReserveSpecialization for Mysql {}
110impl TrustedBackend for Mysql {}
111
112#[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)]
113pub struct MysqlStyleDefaultValueClause;
114
115#[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)]
116pub struct MysqlConcatClause;
117
118#[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)]
119pub struct MysqlOnConflictClause;
120
121#[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)]
122pub struct MysqlRequiresOrderForWindowFunctions;
123
124impl SupportsOnConflictClause for MysqlOnConflictClause {}
125
126#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MySqlLikeBatchUpdateSupport {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f, "MySqlLikeBatchUpdateSupport")
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MySqlLikeBatchUpdateSupport {
#[inline]
fn clone(&self) -> MySqlLikeBatchUpdateSupport { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for MySqlLikeBatchUpdateSupport { }Copy)]
127pub struct MySqlLikeBatchUpdateSupport;
128
129impl SupportsBatchUpdate for MySqlLikeBatchUpdateSupport {}