File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -885,6 +885,7 @@ impl<'a> Tokenizer<'a> {
885
885
chars. next ( ) ; // consume
886
886
match chars. peek ( ) {
887
887
Some ( '>' ) => self . consume_and_return ( chars, Token :: RArrow ) ,
888
+ Some ( '=' ) => self . consume_and_return ( chars, Token :: DoubleEq ) ,
888
889
_ => Ok ( Some ( Token :: Eq ) ) ,
889
890
}
890
891
}
Original file line number Diff line number Diff line change @@ -61,6 +61,14 @@ fn parse_create_virtual_table() {
61
61
sqlite_and_generic ( ) . verified_stmt ( sql) ;
62
62
}
63
63
64
+ #[ test]
65
+ fn double_equality_operator ( ) {
66
+ // Sqlite supports this operator: https://www.sqlite.org/lang_expr.html#binaryops
67
+ let input = "SELECT a==b FROM t" ;
68
+ let expected = "SELECT a = b FROM t" ;
69
+ let _ = sqlite_and_generic ( ) . one_statement_parses_to ( input, expected) ;
70
+ }
71
+
64
72
#[ test]
65
73
fn parse_create_table_auto_increment ( ) {
66
74
let sql = "CREATE TABLE foo (bar INT PRIMARY KEY AUTOINCREMENT)" ;
You can’t perform that action at this time.
0 commit comments