| 14 | }; |
| 15 | |
| 16 | TEST_F(NodeUpdateTest, UpdateSameRow) { |
| 17 | ASSERT_TRUE(conn->query("CREATE NODE TABLE IF NOT EXISTS Product (item STRING, price INT64, " |
| 18 | "PRIMARY KEY (item))") |
| 19 | ->isSuccess()); |
| 20 | ASSERT_TRUE(conn->query("CREATE (n:Product {item: 'watch'}) SET n.price = 100")->isSuccess()); |
| 21 | ASSERT_TRUE( |
| 22 | conn->query("MATCH (n:Product) WHERE n.item = 'watch' SET n.price = 200")->isSuccess()); |
| 23 | ASSERT_TRUE( |
| 24 | conn->query("MATCH (n:Product) WHERE n.item = 'watch' SET n.price = 300")->isSuccess()); |
| 25 | const auto res = conn->query("MATCH (n:Product) RETURN n.price"); |
| 26 | ASSERT_TRUE(res->isSuccess() && res->hasNext()); |
| 27 | ASSERT_EQ(res->getNext()->getValue(0)->val.int64Val, 300); |
| 28 | } |
| 29 | |
| 30 | TEST_F(NodeUpdateTest, UpdateSameRowRedundantly) { |
| 31 | if (inMemMode || systemConfig->checkpointThreshold == 0) { |