myuan 2 роки тому
батько
коміт
0fb2df0790
1 змінених файлів з 21 додано та 1 видалено
  1. 21 1
      run_test.py

+ 21 - 1
run_test.py

@@ -203,7 +203,7 @@ async def assert_sqls():
         ],
     )
     await assert_sql(
-        "update tb1 set col1=3, col4=4 where not col1=2 and col2=4;",
+        "update tb1 set col1=3, col4=4 where not not not col1=2 and col2=4;",
         [
             {
                 "type": "update",
@@ -221,6 +221,26 @@ async def assert_sqls():
                     },
                 ],
                 "where": {
+                    "type": "且",
+                    "left": {
+                        "type": "非",
+                        "left": {
+                            "type": "非",
+                            "left": {
+                                "type": "非",
+                                "left": {
+                                    "type": "相等",
+                                    "left": {"type": "identifier", "value": "col1"},
+                                    "right": {"type": "int", "value": 2},
+                                },
+                            },
+                        },
+                    },
+                    "right": {
+                        "type": "相等",
+                        "left": {"type": "identifier", "value": "col2"},
+                        "right": {"type": "int", "value": 4},
+                    },
                 },
             }
         ],