File tree Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Expand file tree Collapse file tree 4 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -147,4 +147,8 @@ impl Dialect for GenericDialect {
147
147
fn supports_array_typedef_size ( & self ) -> bool {
148
148
true
149
149
}
150
+
151
+ fn supports_match_against ( & self ) -> bool {
152
+ true
153
+ }
150
154
}
Original file line number Diff line number Diff line change @@ -479,6 +479,11 @@ pub trait Dialect: Debug + Any {
479
479
false
480
480
}
481
481
482
+ /// Does the dialect support the `MATCH() AGAINST()` syntax?
483
+ fn supports_match_against ( & self ) -> bool {
484
+ false
485
+ }
486
+
482
487
/// Dialect-specific infix parser override
483
488
///
484
489
/// This method is called to parse the next infix expression.
Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ impl Dialect for MySqlDialect {
129
129
fn requires_single_line_comment_whitespace ( & self ) -> bool {
130
130
true
131
131
}
132
+
133
+ fn supports_match_against ( & self ) -> bool {
134
+ true
135
+ }
132
136
}
133
137
134
138
/// `LOCK TABLES`
Original file line number Diff line number Diff line change @@ -1198,7 +1198,7 @@ impl<'a> Parser<'a> {
1198
1198
})))
1199
1199
}
1200
1200
Keyword::NOT => Ok(Some(self.parse_not()?)),
1201
- Keyword::MATCH if dialect_of!( self is MySqlDialect | GenericDialect ) => {
1201
+ Keyword::MATCH if self.dialect.supports_match_against( ) => {
1202
1202
Ok(Some(self.parse_match_against()?))
1203
1203
}
1204
1204
Keyword::STRUCT if self.dialect.supports_struct_literal() => {
You can’t perform that action at this time.
0 commit comments