MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / TEST_F

Function TEST_F

test/storage/node_update_test.cpp:16–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14};
15
16TEST_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
30TEST_F(NodeUpdateTest, UpdateSameRowRedundantly) {
31 if (inMemMode || systemConfig->checkpointThreshold == 0) {

Callers

nothing calls this directly

Calls 5

isSuccessMethod · 0.45
queryMethod · 0.45
hasNextMethod · 0.45
getValueMethod · 0.45
getNextMethod · 0.45

Tested by

no test coverage detected