Skip to content

Commit 691bb83

Browse files
committed
Rename dialect function
1 parent 01e4ecf commit 691bb83

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/dialect/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ pub trait Dialect: Debug + Any {
12231223
}
12241224

12251225
/// Returns true if the dialect considers the `&&` operator as a boolean AND operator.
1226-
fn supports_overlap_as_and_operator(&self) -> bool {
1226+
fn supports_double_ampersand_operator(&self) -> bool {
12271227
false
12281228
}
12291229
}

src/dialect/mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl Dialect for MySqlDialect {
173173
}
174174

175175
/// See: <https://dev.mysql.com/doc/refman/8.4/en/expressions.html>
176-
fn supports_overlap_as_and_operator(&self) -> bool {
176+
fn supports_double_ampersand_operator(&self) -> bool {
177177
true
178178
}
179179
}

src/parser/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3500,7 +3500,7 @@ impl<'a> Parser<'a> {
35003500
Token::Overlap if dialect_is!(dialect is PostgreSqlDialect | GenericDialect) => {
35013501
Some(BinaryOperator::PGOverlap)
35023502
}
3503-
Token::Overlap if dialect.supports_overlap_as_and_operator() => {
3503+
Token::Overlap if dialect.supports_double_ampersand_operator() => {
35043504
Some(BinaryOperator::And)
35053505
}
35063506
Token::CaretAt if dialect_is!(dialect is PostgreSqlDialect | GenericDialect) => {

tests/sqlparser_common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18040,6 +18040,6 @@ fn parse_select_parenthesized_wildcard() {
1804018040

1804118041
#[test]
1804218042
fn parse_overlap_as_bool_and() {
18043-
let dialects = all_dialects_where(|d| d.supports_overlap_as_and_operator());
18043+
let dialects = all_dialects_where(|d| d.supports_double_ampersand_operator());
1804418044
dialects.one_statement_parses_to("SELECT x && y", "SELECT x AND y");
1804518045
}

0 commit comments

Comments
 (0)