Skip to content

Commit bada516

Browse files
committed
re-added updates accidentally removed in last commit
1 parent 743bb52 commit bada516

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

src/dialect/mysql.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const RESERVED_FOR_TABLE_ALIAS_MYSQL: &[Keyword] = &[
3535
];
3636

3737
/// A [`Dialect`] for [MySQL](https://www.mysql.com/)
38-
#[derive(Debug, Default)]
38+
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
39+
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3940
pub struct MySqlDialect {}
4041

4142
impl Dialect for MySqlDialect {
@@ -88,6 +89,11 @@ impl Dialect for MySqlDialect {
8889
true
8990
}
9091

92+
/// see <https://dev.mysql.com/doc/refman/8.4/en/comments.html>
93+
fn supports_multiline_comment_hints(&self) -> bool {
94+
true
95+
}
96+
9197
fn parse_infix(
9298
&self,
9399
parser: &mut crate::parser::Parser,
@@ -160,6 +166,10 @@ impl Dialect for MySqlDialect {
160166
true
161167
}
162168

169+
fn supports_select_modifiers(&self) -> bool {
170+
true
171+
}
172+
163173
fn supports_set_names(&self) -> bool {
164174
true
165175
}
@@ -190,6 +200,11 @@ impl Dialect for MySqlDialect {
190200
fn supports_comment_optimizer_hint(&self) -> bool {
191201
true
192202
}
203+
204+
/// See: <https://dev.mysql.com/doc/refman/8.4/en/create-table.html>
205+
fn supports_constraint_keyword_without_name(&self) -> bool {
206+
true
207+
}
193208
}
194209

195210
/// `LOCK TABLES`

src/dialect/sqlite.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ use crate::parser::{Parser, ParserError};
3030
/// [`CREATE TABLE`](https://sqlite.org/lang_createtable.html) statement with no
3131
/// type specified, as in `CREATE TABLE t1 (a)`. In the AST, these columns will
3232
/// have the data type [`Unspecified`](crate::ast::DataType::Unspecified).
33-
#[derive(Debug, Default)]
33+
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
34+
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3435
pub struct SQLiteDialect {}
3536

3637
impl Dialect for SQLiteDialect {

0 commit comments

Comments
 (0)