Skip to content

Commit 1cba1f4

Browse files
committed
temp [ci skip]
1 parent 3d5bd5f commit 1cba1f4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

crates/lib-dialects/src/mysql.rs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,45 @@ pub fn raw_dialect() -> Dialect {
430430
.to_matchable()
431431
.into(),
432432
),
433+
(
434+
// An `OPTIMIZE TABLE` statement.
435+
// https://dev.mysql.com/doc/refman/8.0/en/optimize-table.html
436+
"OptimizeTableStatementSegment".into(),
437+
Sequence::new(vec_of_erased![
438+
Ref::keyword("OPTIMIZE"),
439+
one_of(vec_of_erased![
440+
Ref::keyword("NO_WRITE_TO_BINLOG"),
441+
Ref::keyword("LOCAL"),
442+
])
443+
.config(|one| one.optional()),
444+
Ref::keyword("TABLE"),
445+
Delimited::new(vec_of_erased![Ref::new("TableReferenceSegment"),]),
446+
])
447+
.to_matchable()
448+
.into(),
449+
),
450+
(
451+
// An `UPDATE` statement.
452+
// https://dev.mysql.com/doc/refman/8.0/en/update.html
453+
"UpdateStatementSegment".into(),
454+
Sequence::new(vec_of_erased![
455+
Ref::keyword("UPDATE"),
456+
Ref::keyword("LOW_PRIORITY").optional(),
457+
Ref::keyword("IGNORE").optional(),
458+
MetaSegment::indent(),
459+
Delimited::new(vec_of_erased![
460+
Ref::new("TableReferenceSegment"),
461+
Ref::new("FromExpressionSegment"),
462+
]),
463+
MetaSegment::dedent(),
464+
Ref::new("SetClauseListSegment"),
465+
Ref::new("WhereClauseSegment").optional(),
466+
Ref::new("OrderByClauseSegment").optional(),
467+
Ref::new("LimitClauseSegment").optional(),
468+
])
469+
.to_matchable()
470+
.into(),
471+
),
433472
]);
434473

435474
mysql

0 commit comments

Comments
 (0)