Return properties as a list in SHOW CONSTRAINT INFO for unique constraints

Summary:
Before this change properties were joined by ", " and returned as a single string,
which was ambiguous for properties that contain ", ". This diff solves this
problem by returning properties as a list type.

Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2778
This commit is contained in:
Tonko Sabolcec
2020-05-29 12:01:49 +02:00
parent d36da12b48
commit 3932376301
2 changed files with 10 additions and 7 deletions

View File

@@ -402,7 +402,10 @@ TEST_F(InterpreterTest, UniqueConstraintTest) {
ASSERT_EQ(result.size(), 3U);
ASSERT_EQ(result[0].ValueString(), "unique");
ASSERT_EQ(result[1].ValueString(), "A");
ASSERT_EQ(result[2].ValueString(), "a, b");
const auto &properties = result[2].ValueList();
ASSERT_EQ(properties.size(), 2U);
ASSERT_EQ(properties[0].ValueString(), "a");
ASSERT_EQ(properties[1].ValueString(), "b");
}
// Drop constraint.