Create set remove delete

This commit is contained in:
Andi Skrgat
2023-05-15 12:48:19 +02:00
parent 0f69e0aaa1
commit c4f1199b80
2 changed files with 7 additions and 7 deletions

View File

@@ -292,7 +292,7 @@ TEST(QueryPlan, CreateExpand) {
}
for (auto vertex : dba.Vertices(memgraph::storage::View::OLD)) {
dba.PrefetchOutEdges();
dba.PrefetchOutEdges(vertex);
auto maybe_edges = vertex.OutEdges(memgraph::storage::View::OLD);
MG_ASSERT(maybe_edges.HasValue());
for (auto edge : *maybe_edges) {
@@ -1132,7 +1132,7 @@ TEST(QueryPlan, SetProperty) {
EXPECT_EQ(CountEdges(&dba, memgraph::storage::View::OLD), 2);
for (auto vertex : dba.Vertices(memgraph::storage::View::OLD)) {
dba.PrefetchOutEdges();
dba.PrefetchOutEdges(vertex);
auto maybe_edges = vertex.OutEdges(memgraph::storage::View::OLD);
ASSERT_TRUE(maybe_edges.HasValue());
for (auto edge : *maybe_edges) {
@@ -1189,7 +1189,7 @@ TEST(QueryPlan, SetProperties) {
EXPECT_EQ(CountEdges(&dba, memgraph::storage::View::OLD), 1);
for (auto vertex : dba.Vertices(memgraph::storage::View::OLD)) {
dba.PrefetchOutEdges();
dba.PrefetchOutEdges(vertex);
auto maybe_edges = vertex.OutEdges(memgraph::storage::View::OLD);
ASSERT_TRUE(maybe_edges.HasValue());
for (auto edge : *maybe_edges) {
@@ -1378,7 +1378,7 @@ TEST(QueryPlan, RemoveProperty) {
EXPECT_EQ(CountEdges(&dba, memgraph::storage::View::OLD), 2);
for (auto vertex : dba.Vertices(memgraph::storage::View::OLD)) {
dba.PrefetchOutEdges();
dba.PrefetchOutEdges(vertex);
auto maybe_edges = vertex.OutEdges(memgraph::storage::View::OLD);
ASSERT_TRUE(maybe_edges.HasValue());
for (auto edge : *maybe_edges) {

View File

@@ -46,8 +46,8 @@ TEST(QueryPlan, CreateNodeWithAttributes) {
const auto &v = node_value.ValueVertex();
EXPECT_TRUE(*v.HasLabel(memgraph::storage::View::NEW, label));
EXPECT_EQ(v.GetProperty(memgraph::storage::View::NEW, property)->ValueInt(), 42);
dba->PrefetchInEdges();
dba->PrefetchOutEdges();
dba->PrefetchInEdges(v.impl_);
dba->PrefetchOutEdges(v.impl_);
EXPECT_EQ(CountIterable(*v.InEdges(memgraph::storage::View::NEW)), 0);
EXPECT_EQ(CountIterable(*v.OutEdges(memgraph::storage::View::NEW)), 0);
// Invokes LOG(FATAL) instead of erroring out.
@@ -115,7 +115,7 @@ TEST(QueryPlan, ScanAllByLabel) {
// Add labeled vertices
for (int i = 0; i < 42; ++i) {
auto v = dba->CreateVertex();
ASSERT_TRUE(v->AddLabel(label).HasValue());
ASSERT_TRUE(v.AddLabel(label).HasValue());
}
EXPECT_FALSE(dba->Commit().HasError());
}