File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -885,6 +885,7 @@ impl<'a> Tokenizer<'a> {
885885 chars. next ( ) ; // consume
886886 match chars. peek ( ) {
887887 Some ( '>' ) => self . consume_and_return ( chars, Token :: RArrow ) ,
888+ Some ( '=' ) => self . consume_and_return ( chars, Token :: DoubleEq ) ,
888889 _ => Ok ( Some ( Token :: Eq ) ) ,
889890 }
890891 }
Original file line number Diff line number Diff line change @@ -61,6 +61,14 @@ fn parse_create_virtual_table() {
6161 sqlite_and_generic ( ) . verified_stmt ( sql) ;
6262}
6363
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+
6472#[ test]
6573fn parse_create_table_auto_increment ( ) {
6674 let sql = "CREATE TABLE foo (bar INT PRIMARY KEY AUTOINCREMENT)" ;
You can’t perform that action at this time.
0 commit comments