mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-26 08:54:06 +00:00
Support mysql RLIKE
and REGEXP
binary operators (#1017)
This commit is contained in:
parent
88510f6625
commit
c03586b727
5 changed files with 53 additions and 3 deletions
|
@ -1454,6 +1454,18 @@ fn parse_show_variables() {
|
|||
mysql_and_generic().verified_stmt("SHOW VARIABLES WHERE value = '3306'");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_rlike_and_regexp() {
|
||||
for s in &[
|
||||
"SELECT 1 WHERE 'a' RLIKE '^a$'",
|
||||
"SELECT 1 WHERE 'a' REGEXP '^a$'",
|
||||
"SELECT 1 WHERE 'a' NOT RLIKE '^a$'",
|
||||
"SELECT 1 WHERE 'a' NOT REGEXP '^a$'",
|
||||
] {
|
||||
mysql_and_generic().verified_only_select(s);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_kill() {
|
||||
let stmt = mysql_and_generic().verified_stmt("KILL CONNECTION 5");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue