Fix label/edge/property name escaping in DUMP DATABASE
Summary: This diff fixes the issue for label name (and edge type/property) with spaces and special characters to avoid possible OpenCypher injections. Consider an example where label name is 'hello :world'. `DUMP DATABASE` used to return query which creates a node (u:hello :world) - i.e. node that contains two labels 'hello' and 'world'. This fix escapes names to create the following node with exactly one label as expected: ``` (u:`hello :world`) ``` Reviewers: mferencevic Reviewed By: mferencevic Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2774
This commit is contained in:
parent
b6dfb44b4c
commit
59bc9d8989
@ -27,6 +27,22 @@ const char *kInternalPropertyId = "__mg_id__";
|
||||
// index on internal property id.
|
||||
const char *kInternalVertexLabel = "__mg_vertex__";
|
||||
|
||||
/// A helper function that escapes label, edge type and property names.
|
||||
std::string EscapeName(const std::string_view &value) {
|
||||
std::string out;
|
||||
out.reserve(value.size() + 2);
|
||||
out.append(1, '`');
|
||||
for (auto c : value) {
|
||||
if (c == '`') {
|
||||
out.append("``");
|
||||
} else {
|
||||
out.append(1, c);
|
||||
}
|
||||
}
|
||||
out.append(1, '`');
|
||||
return out;
|
||||
}
|
||||
|
||||
void DumpPreciseDouble(std::ostream *os, double value) {
|
||||
// A temporary stream is used to keep precision of the original output
|
||||
// stream unchanged.
|
||||
@ -66,7 +82,7 @@ void DumpPropertyValue(std::ostream *os, const storage::PropertyValue &value) {
|
||||
*os << "{";
|
||||
const auto &map = value.ValueMap();
|
||||
utils::PrintIterable(*os, map, ", ", [](auto &os, const auto &kv) {
|
||||
os << kv.first << ": ";
|
||||
os << EscapeName(kv.first) << ": ";
|
||||
DumpPropertyValue(&os, kv.second);
|
||||
});
|
||||
*os << "}";
|
||||
@ -85,7 +101,7 @@ void DumpProperties(
|
||||
if (store.size() > 0) *os << ", ";
|
||||
}
|
||||
utils::PrintIterable(*os, store, ", ", [&dba](auto &os, const auto &kv) {
|
||||
os << dba->PropertyToName(kv.first) << ": ";
|
||||
os << EscapeName(dba->PropertyToName(kv.first)) << ": ";
|
||||
DumpPropertyValue(&os, kv.second);
|
||||
});
|
||||
*os << "}";
|
||||
@ -112,7 +128,7 @@ void DumpVertex(std::ostream *os, query::DbAccessor *dba,
|
||||
}
|
||||
}
|
||||
for (const auto &label : *maybe_labels) {
|
||||
*os << ":" << dba->LabelToName(label);
|
||||
*os << ":" << EscapeName(dba->LabelToName(label));
|
||||
}
|
||||
*os << " ";
|
||||
auto maybe_props = vertex.Properties(storage::View::OLD);
|
||||
@ -145,7 +161,7 @@ void DumpEdge(std::ostream *os, query::DbAccessor *dba,
|
||||
*os << " AND ";
|
||||
*os << "v." << kInternalPropertyId << " = " << edge.To().CypherId() << " ";
|
||||
*os << "CREATE (u)-[";
|
||||
*os << ":" << dba->EdgeTypeToName(edge.EdgeType());
|
||||
*os << ":" << EscapeName(dba->EdgeTypeToName(edge.EdgeType()));
|
||||
auto maybe_props = edge.Properties(storage::View::OLD);
|
||||
if (maybe_props.HasError()) {
|
||||
switch (maybe_props.GetError()) {
|
||||
@ -171,31 +187,33 @@ void DumpEdge(std::ostream *os, query::DbAccessor *dba,
|
||||
|
||||
void DumpLabelIndex(std::ostream *os, query::DbAccessor *dba,
|
||||
const storage::LabelId label) {
|
||||
*os << "CREATE INDEX ON :" << dba->LabelToName(label) << ";";
|
||||
*os << "CREATE INDEX ON :" << EscapeName(dba->LabelToName(label)) << ";";
|
||||
}
|
||||
|
||||
void DumpLabelPropertyIndex(std::ostream *os, query::DbAccessor *dba,
|
||||
storage::LabelId label,
|
||||
storage::PropertyId property) {
|
||||
*os << "CREATE INDEX ON :" << dba->LabelToName(label) << "("
|
||||
<< dba->PropertyToName(property) << ");";
|
||||
*os << "CREATE INDEX ON :" << EscapeName(dba->LabelToName(label)) << "("
|
||||
<< EscapeName(dba->PropertyToName(property)) << ");";
|
||||
}
|
||||
|
||||
void DumpExistenceConstraint(std::ostream *os, query::DbAccessor *dba,
|
||||
storage::LabelId label,
|
||||
storage::PropertyId property) {
|
||||
*os << "CREATE CONSTRAINT ON (u:" << dba->LabelToName(label)
|
||||
<< ") ASSERT EXISTS (u." << dba->PropertyToName(property) << ");";
|
||||
*os << "CREATE CONSTRAINT ON (u:" << EscapeName(dba->LabelToName(label))
|
||||
<< ") ASSERT EXISTS (u." << EscapeName(dba->PropertyToName(property))
|
||||
<< ");";
|
||||
}
|
||||
|
||||
void DumpUniqueConstraint(std::ostream *os, query::DbAccessor *dba,
|
||||
storage::LabelId label,
|
||||
const std::set<storage::PropertyId> &properties) {
|
||||
*os << "CREATE CONSTRAINT ON (u:" << dba->LabelToName(label) << ") ASSERT ";
|
||||
utils::PrintIterable(*os, properties, ", ",
|
||||
[&dba](auto &stream, const auto &property) {
|
||||
stream << "u." << dba->PropertyToName(property);
|
||||
});
|
||||
*os << "CREATE CONSTRAINT ON (u:" << EscapeName(dba->LabelToName(label))
|
||||
<< ") ASSERT ";
|
||||
utils::PrintIterable(
|
||||
*os, properties, ", ", [&dba](auto &stream, const auto &property) {
|
||||
stream << "u." << EscapeName(dba->PropertyToName(property));
|
||||
});
|
||||
*os << " IS UNIQUE;";
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
CREATE INDEX ON :label;
|
||||
CREATE INDEX ON :label2(prop2);
|
||||
CREATE INDEX ON :label2(prop);
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT EXISTS (u.ext);
|
||||
CREATE INDEX ON :`label`;
|
||||
CREATE INDEX ON :`label2`(`prop2`);
|
||||
CREATE INDEX ON :`label2`(`prop`);
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT EXISTS (u.`ext`);
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 0, prop2: ["kaj", 2, Null, {prop4: -1.341}], prop: "joj", ext: 2});
|
||||
CREATE (:__mg_vertex__:label:label2 {__mg_id__: 1, prop: "joj", ext: 2});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 0 CREATE (u)-[:link {prop: -1, ext: [false, {k: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 1 CREATE (u)-[:link {prop: -1, ext: [false, {k: "l"}]}]->(v);
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 0, `prop2`: ["kaj", 2, Null, {`prop4`: -1.341}], `prop`: "joj", `ext`: 2});
|
||||
CREATE (:__mg_vertex__:`label`:`label2` {__mg_id__: 1, `prop`: "joj", `ext`: 2});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 0 CREATE (u)-[:`link` {`prop`: -1, `ext`: [false, {`k`: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 1 CREATE (u)-[:`link` {`prop`: -1, `ext`: [false, {`k`: "l"}]}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,10 +1,10 @@
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT EXISTS (u.prop);
|
||||
CREATE CONSTRAINT ON (u:label2) ASSERT EXISTS (u.prop1);
|
||||
CREATE CONSTRAINT ON (u:labellabel) ASSERT EXISTS (u.prop);
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT EXISTS (u.`prop`);
|
||||
CREATE CONSTRAINT ON (u:`label2`) ASSERT EXISTS (u.`prop1`);
|
||||
CREATE CONSTRAINT ON (u:`labellabel`) ASSERT EXISTS (u.`prop`);
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 0, prop: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 1, prop: false});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 2, prop1: 1});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 3, prop1: 2});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 0, `prop`: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 1, `prop`: false});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 2, `prop1`: 1});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 3, `prop1`: 2});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -3,43 +3,43 @@ CREATE (:__mg_vertex__ {__mg_id__: 0});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 4});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 5});
|
||||
CREATE (:__mg_vertex__:lab {__mg_id__: 6});
|
||||
CREATE (:__mg_vertex__:lab {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:lab {__mg_id__: 8});
|
||||
CREATE (:__mg_vertex__:lab2 {__mg_id__: 9});
|
||||
CREATE (:__mg_vertex__:lab2 {__mg_id__: 10});
|
||||
CREATE (:__mg_vertex__:lab2 {__mg_id__: 11});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 4});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 5});
|
||||
CREATE (:__mg_vertex__:`lab` {__mg_id__: 6});
|
||||
CREATE (:__mg_vertex__:`lab` {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:`lab` {__mg_id__: 8});
|
||||
CREATE (:__mg_vertex__:`lab2` {__mg_id__: 9});
|
||||
CREATE (:__mg_vertex__:`lab2` {__mg_id__: 10});
|
||||
CREATE (:__mg_vertex__:`lab2` {__mg_id__: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 13});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 14});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:link]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 3 CREATE (u)-[:link2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:link]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 4 CREATE (u)-[:link]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:link]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 4 CREATE (u)-[:link2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:link2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 4 CREATE (u)-[:link]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 5 CREATE (u)-[:link]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 4 CREATE (u)-[:link2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 5 CREATE (u)-[:link2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 13 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 11 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 12 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 11 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 12 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 13 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 9 CREATE (u)-[:link3]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 11 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 12 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 13 CREATE (u)-[:link88]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 12 CREATE (u)-[:link3]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 14 CREATE (u)-[:selfedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 11 CREATE (u)-[:selfedge2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 13 CREATE (u)-[:link3]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 12 CREATE (u)-[:selfedge2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 13 AND v.__mg_id__ = 13 CREATE (u)-[:selfedge2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`link`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 3 CREATE (u)-[:`link2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:`link`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 4 CREATE (u)-[:`link`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:`link`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 4 CREATE (u)-[:`link2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:`link2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 4 CREATE (u)-[:`link`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 5 CREATE (u)-[:`link`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 4 CREATE (u)-[:`link2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 5 CREATE (u)-[:`link2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 13 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 11 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 12 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 11 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 12 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 13 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 9 CREATE (u)-[:`link3`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 11 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 12 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 13 CREATE (u)-[:`link88`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 12 CREATE (u)-[:`link3`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 14 CREATE (u)-[:`selfedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 11 AND v.__mg_id__ = 11 CREATE (u)-[:`selfedge2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 13 CREATE (u)-[:`link3`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 12 CREATE (u)-[:`selfedge2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 13 AND v.__mg_id__ = 13 CREATE (u)-[:`selfedge2`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -13,12 +13,12 @@ CREATE (:__mg_vertex__ {__mg_id__: 10});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 13});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:edge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 3 CREATE (u)-[:edge {prop: 1}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:edge {prop: false}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 6 AND v.__mg_id__ = 7 CREATE (u)-[:edge2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 9 CREATE (u)-[:edge2 {prop: -3.141}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 11 CREATE (u)-[:edgelink {prop: 1, prop2: {prop4: 9}}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 13 CREATE (u)-[:edgelink {prop: [1, Null, false, ""]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`edge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 3 CREATE (u)-[:`edge` {`prop`: 1}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:`edge` {`prop`: false}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 6 AND v.__mg_id__ = 7 CREATE (u)-[:`edge2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 9 CREATE (u)-[:`edge2` {`prop`: -3.141}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 11 CREATE (u)-[:`edgelink` {`prop`: 1, `prop2`: {`prop4`: 9}}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 13 CREATE (u)-[:`edgelink` {`prop`: [1, Null, false, ""]}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,16 +1,16 @@
|
||||
CREATE INDEX ON :label2;
|
||||
CREATE INDEX ON :label1;
|
||||
CREATE INDEX ON :label3;
|
||||
CREATE INDEX ON :label(prop);
|
||||
CREATE INDEX ON :label2(prop);
|
||||
CREATE INDEX ON :`label2`;
|
||||
CREATE INDEX ON :`label1`;
|
||||
CREATE INDEX ON :`label3`;
|
||||
CREATE INDEX ON :`label`(`prop`);
|
||||
CREATE INDEX ON :`label2`(`prop`);
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 0});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 2});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 3, prop: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 4, prop: 2});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 5, prop: 3});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 6, prop2: 1});
|
||||
CREATE (:__mg_vertex__:label3 {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 0});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 2});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 3, `prop`: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 4, `prop`: 2});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 5, `prop`: 3});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 6, `prop2`: 1});
|
||||
CREATE (:__mg_vertex__:`label3` {__mg_id__: 7});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,16 +1,16 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 2, prop: false});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 3, prop: true});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 4, prop: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 5, prop2: 3.141});
|
||||
CREATE (:__mg_vertex__:label6 {__mg_id__: 6, prop2: -314000000, prop3: true});
|
||||
CREATE (:__mg_vertex__:label1:label2:label3 {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 8, prop: 1, prop2: 2, prop3: "str"});
|
||||
CREATE (:__mg_vertex__:label1:label2 {__mg_id__: 9, prop: {prop_nes: "kaj je"}});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 10, prop_array: [1, false, Null, "str", {prop2: 2}]});
|
||||
CREATE (:__mg_vertex__:label:label3 {__mg_id__: 11, prop: {prop: [1, false], prop2: {}, prop3: "test2", prop4: "test"}});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12, prop: " \n\"\'\t\\%"});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 2, `prop`: false});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 3, `prop`: true});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 4, `prop`: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 5, `prop2`: 3.141});
|
||||
CREATE (:__mg_vertex__:`label6` {__mg_id__: 6, `prop2`: -314000000, `prop3`: true});
|
||||
CREATE (:__mg_vertex__:`label1`:`label2`:`label3` {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 8, `prop`: 1, `prop2`: 2, `prop3`: "str"});
|
||||
CREATE (:__mg_vertex__:`label1`:`label2` {__mg_id__: 9, `prop`: {`prop_nes`: "kaj je"}});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 10, `prop_array`: [1, false, Null, "str", {`prop2`: 2}]});
|
||||
CREATE (:__mg_vertex__:`label`:`label3` {__mg_id__: 11, `prop`: {`prop`: [1, false], `prop2`: {}, `prop3`: "test2", `prop4`: "test"}});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12, `prop`: " \n\"\'\t\\%"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,16 +1,16 @@
|
||||
CREATE INDEX ON :label;
|
||||
CREATE INDEX ON :label2(prop2);
|
||||
CREATE INDEX ON :label2(prop);
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT EXISTS (u.ext);
|
||||
CREATE CONSTRAINT ON (u:label2) ASSERT u.prop2, u.prop IS UNIQUE;
|
||||
CREATE INDEX ON :`label`;
|
||||
CREATE INDEX ON :`label2`(`prop2`);
|
||||
CREATE INDEX ON :`label2`(`prop`);
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT EXISTS (u.`ext`);
|
||||
CREATE CONSTRAINT ON (u:`label2`) ASSERT u.`prop2`, u.`prop` IS UNIQUE;
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 0, prop2: ["kaj", 2, Null, {prop4: -1.341}], prop: "joj", ext: 2});
|
||||
CREATE (:__mg_vertex__:label:label2 {__mg_id__: 1, prop: "joj", ext: 2});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 2, prop2: 2, prop: 1});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 3, prop2: 2, prop: 2});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 0 CREATE (u)-[:link {prop: -1, ext: [false, {k: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 1 CREATE (u)-[:link {prop: -1, ext: [false, {k: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:link {prop: -1, ext: [false, {k: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 3 CREATE (u)-[:link {prop: -1, ext: [false, {k: "l"}]}]->(v);
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 0, `prop2`: ["kaj", 2, Null, {`prop4`: -1.341}], `prop`: "joj", `ext`: 2});
|
||||
CREATE (:__mg_vertex__:`label`:`label2` {__mg_id__: 1, `prop`: "joj", `ext`: 2});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 2, `prop2`: 2, `prop`: 1});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 3, `prop2`: 2, `prop`: 2});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 0 CREATE (u)-[:`link` {`prop`: -1, `ext`: [false, {`k`: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 1 CREATE (u)-[:`link` {`prop`: -1, `ext`: [false, {`k`: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`link` {`prop`: -1, `ext`: [false, {`k`: "l"}]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 3 CREATE (u)-[:`link` {`prop`: -1, `ext`: [false, {`k`: "l"}]}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE CONSTRAINT ON (u:label2) ASSERT EXISTS (u.ext2);
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT EXISTS (u.ext);
|
||||
CREATE CONSTRAINT ON (u:label2) ASSERT u.a, u.b IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT u.a IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT u.b IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:label) ASSERT u.c IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:`label2`) ASSERT EXISTS (u.`ext2`);
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT EXISTS (u.`ext`);
|
||||
CREATE CONSTRAINT ON (u:`label2`) ASSERT u.`a`, u.`b` IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT u.`a` IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT u.`b` IS UNIQUE;
|
||||
CREATE CONSTRAINT ON (u:`label`) ASSERT u.`c` IS UNIQUE;
|
||||
|
@ -13,46 +13,46 @@ CREATE (:__mg_vertex__ {__mg_id__: 10});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 13});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 14});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 15});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:edge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 3 CREATE (u)-[:edge {prop: 11}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:edge {prop: true}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 6 AND v.__mg_id__ = 7 CREATE (u)-[:edge2]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 9 CREATE (u)-[:edge2 {prop: -3.141}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 11 CREATE (u)-[:edgelink {prop: {prop: 1, prop2: {prop4: 9}}}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 13 CREATE (u)-[:edgelink {prop: [1, Null, false, "\n\n\n\n\\\"\"\n\t"]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 0 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 1 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 2 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 3 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 4 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 5 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 6 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 7 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 8 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 9 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 10 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 11 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 12 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 13 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 14 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 15 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 0 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 1 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 2 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 3 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 4 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 5 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 6 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 7 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 8 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 9 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 10 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 11 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 12 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 13 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 14 CREATE (u)-[:testedge]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 15 CREATE (u)-[:testedge]->(v);
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 14});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 15});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`edge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 3 CREATE (u)-[:`edge` {`prop`: 11}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 5 CREATE (u)-[:`edge` {`prop`: true}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 6 AND v.__mg_id__ = 7 CREATE (u)-[:`edge2`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 8 AND v.__mg_id__ = 9 CREATE (u)-[:`edge2` {`prop`: -3.141}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 11 CREATE (u)-[:`edgelink` {`prop`: {`prop`: 1, `prop2`: {`prop4`: 9}}}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 12 AND v.__mg_id__ = 13 CREATE (u)-[:`edgelink` {`prop`: [1, Null, false, "\n\n\n\n\\\"\"\n\t"]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 0 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 1 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 2 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 3 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 4 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 5 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 6 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 7 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 8 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 9 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 10 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 11 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 12 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 13 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 14 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 14 AND v.__mg_id__ = 15 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 0 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 1 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 2 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 3 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 4 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 5 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 6 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 7 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 8 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 9 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 10 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 11 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 12 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 13 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 14 CREATE (u)-[:`testedge`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 15 AND v.__mg_id__ = 15 CREATE (u)-[:`testedge`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,4 +1,4 @@
|
||||
CREATE INDEX ON :label2;
|
||||
CREATE INDEX ON :label(prop);
|
||||
CREATE INDEX ON :label(prop2);
|
||||
CREATE INDEX ON :label2(prop2);
|
||||
CREATE INDEX ON :`label2`;
|
||||
CREATE INDEX ON :`label`(`prop`);
|
||||
CREATE INDEX ON :`label`(`prop2`);
|
||||
CREATE INDEX ON :`label2`(`prop2`);
|
||||
|
@ -1,16 +1,16 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 2, prop: false});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 3, prop: true});
|
||||
CREATE (:__mg_vertex__:label2 {__mg_id__: 4, prop: 1});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 5, prop2: 3.141});
|
||||
CREATE (:__mg_vertex__:label6 {__mg_id__: 6, prop2: -314000000, prop3: true});
|
||||
CREATE (:__mg_vertex__:label1:label2:label3 {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 8, prop: 1, prop2: 2, prop3: "str"});
|
||||
CREATE (:__mg_vertex__:label1:label2 {__mg_id__: 9, prop: {prop_nes: "kaj je"}});
|
||||
CREATE (:__mg_vertex__:label {__mg_id__: 10, prop_array: [1, false, Null, "str", {prop2: 2}]});
|
||||
CREATE (:__mg_vertex__:label:label3 {__mg_id__: 11, prop: {prop: [1, false], prop2: {}, prop3: "test2", prop4: "test"}});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12, prop: " \n\"\'\t\\%"});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 2, `prop`: false});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 3, `prop`: true});
|
||||
CREATE (:__mg_vertex__:`label2` {__mg_id__: 4, `prop`: 1});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 5, `prop2`: 3.141});
|
||||
CREATE (:__mg_vertex__:`label6` {__mg_id__: 6, `prop2`: -314000000, `prop3`: true});
|
||||
CREATE (:__mg_vertex__:`label1`:`label2`:`label3` {__mg_id__: 7});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 8, `prop`: 1, `prop2`: 2, `prop3`: "str"});
|
||||
CREATE (:__mg_vertex__:`label1`:`label2` {__mg_id__: 9, `prop`: {`prop_nes`: "kaj je"}});
|
||||
CREATE (:__mg_vertex__:`label` {__mg_id__: 10, `prop_array`: [1, false, Null, "str", {`prop2`: 2}]});
|
||||
CREATE (:__mg_vertex__:`label`:`label3` {__mg_id__: 11, `prop`: {`prop`: [1, false], `prop2`: {}, `prop3`: "test2", `prop4`: "test"}});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12, `prop`: " \n\"\'\t\\%"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,10 +1,10 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry0:hello {__mg_id__: 0, country: "Croatia", content: "yes", browser: "Chrome"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry1 {__mg_id__: 1, country: "United Kingdom", content: "thanks", browser: "Chrome"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry2:world {__mg_id__: 2, country: "Germany", content: "LOL"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry3 {__mg_id__: 3, country: "France", content: "I see", browser: "Firefox"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry4:this:is:a: lot :of: labels {__mg_id__: 4, country: "Italy", content: "fine", browser: "Internet Explorer"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:KNOWS {value: ["5", " asd", " helloworld"]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:KNOWS {value: ["6", "hmmm"]}]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry0`:`hello` {__mg_id__: 0, `country`: "Croatia", `content`: "yes", `browser`: "Chrome"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry1` {__mg_id__: 1, `country`: "United Kingdom", `content`: "thanks", `browser`: "Chrome"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry2`:`world` {__mg_id__: 2, `country`: "Germany", `content`: "LOL"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry3` {__mg_id__: 3, `country`: "France", `content`: "I see", `browser`: "Firefox"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry4`:`this`:`is`:`a`:` lot `:`of`:` labels` {__mg_id__: 4, `country`: "Italy", `content`: "fine", `browser`: "Internet Explorer"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`KNOWS` {`value`: ["5", " asd", " helloworld"]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:`KNOWS` {`value`: ["6", "hmmm"]}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,10 +1,10 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry0:hello {__mg_id__: 0, country: "Croatia", content: "yes", browser: "Chrome"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry1 {__mg_id__: 1, country: "United Kingdom", content: "thanks", browser: "Chrome"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry2:world {__mg_id__: 2, country: "Germany", content: "LOL"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry3 {__mg_id__: 3, country: "France", content: "I see", browser: "Firefox"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:Entry4:this:is:a: lot :of: labels {__mg_id__: 4, country: "Italy", content: "fine", browser: "Internet Explorer"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:KNOWS {value: ["5", " asd", " helloworld"]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:KNOWS {value: ["6", "hmmm"]}]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry0`:`hello` {__mg_id__: 0, `country`: "Croatia", `content`: "yes", `browser`: "Chrome"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry1` {__mg_id__: 1, `country`: "United Kingdom", `content`: "thanks", `browser`: "Chrome"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry2`:`world` {__mg_id__: 2, `country`: "Germany", `content`: "LOL"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry3` {__mg_id__: 3, `country`: "France", `content`: "I see", `browser`: "Firefox"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`Entry4`:`this`:`is`:`a`:` lot `:`of`:` labels` {__mg_id__: 4, `country`: "Italy", `content`: "fine", `browser`: "Internet Explorer"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`KNOWS` {`value`: ["5", " asd", " helloworld"]}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:`KNOWS` {`value`: ["6", "hmmm"]}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,11 +1,11 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, id: "0", country: "Croatia", browser: "Chrome", content: "yes"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, id: "1", country: "United Kingdom", browser: "Chrome", content: "thanks"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, id: "2", country: "Germany", content: "LOL"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, id: "3", country: "France", browser: "Firefox", content: "I see"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, id: "4", country: "Italy", browser: "Internet Explorer", content: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:LIKES]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 2 CREATE (u)-[:VISITED]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:FOLLOWS]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `id`: "0", `country`: "Croatia", `browser`: "Chrome", `content`: "yes"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `id`: "1", `country`: "United Kingdom", `browser`: "Chrome", `content`: "thanks"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `id`: "2", `country`: "Germany", `content`: "LOL"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `id`: "3", `country`: "France", `browser`: "Firefox", `content`: "I see"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `id`: "4", `country`: "Italy", `browser`: "Internet Explorer", `content`: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`LIKES`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 2 CREATE (u)-[:`VISITED`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`FOLLOWS`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, id: "0"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, value: "hello", id: "2"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `id`: "0"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `value`: "hello", `id`: "2"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "world fgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "will this work?", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "world fgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "will this work?", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "ÖworldÖÖÖ fÖgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wilÖl this work?Ö", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "ÖworldÖÖÖ fÖgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wilÖl this work?Ö", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "Öworld,Ö,ÖÖ, fÖ,gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wilÖl t,his work?Ö", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "Öworld,Ö,ÖÖ, fÖ,gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wilÖl t,his work?Ö", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "woÖrld"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wilÖl this work?ÖÖ", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "woÖrld"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wilÖl this work?ÖÖ", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, id: "0"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, value: "hello", id: "2"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `id`: "0"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `value`: "hello", `id`: "2"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "world"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "my", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "world"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "my", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "world fgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "will this work?", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "world fgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "will this work?", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "world"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "my", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "world"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "my", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "\"world\"\"\" f\"gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wil\"l this work?\"", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "\"world\"\"\" f\"gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wil\"l this work?\"", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "\"worldÖ\"Ö\"\"Ö f\"Ögh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wil\"l tÖhis work?\"", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "\"worldÖ\"Ö\"\"Ö f\"Ögh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wil\"l tÖhis work?\"", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "wo\"rld"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wil\"l this work?\"\"", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "wo\"rld"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wil\"l this work?\"\"", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "world fgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "will this work?", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "world fgh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "will this work?", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "\"world\"\"\" f\"gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wil\"l this work?\"", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "\"world\"\"\" f\"gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wil\"l this work?\"", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "\"world,\",\"\", f\",gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wil\"l t,his work?\"", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "\"world,\",\"\", f\",gh"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wil\"l t,his work?\"", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, test: "asd", id: "0", value: "wo\"rld"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, test: "string", id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, test: "wil\"l this work?\"\"", id: "2", value: "hello"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `test`: "asd", `id`: "0", `value`: "wo\"rld"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `test`: "string", `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `test`: "wil\"l this work?\"\"", `id`: "2", `value`: "hello"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, id: "0"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, id: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, value: "hello", id: "2"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `id`: "0"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `id`: "1"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `value`: "hello", `id`: "2"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,17 +1,17 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, country: "Austria", value: 6});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, country: "Hungary", value: 7});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, country: "Romania", value: 8});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3, country: "Bulgaria", value: 9});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 4, country: "Spain", value: 10});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 5, country: "Latvia", value: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 6, country: "Russia", value: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 7, country: "Poland", value: 13});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 8, country: "Czech Republic", value: 14});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 9, country: "Moldova", value: 15});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:NEIGHBOUR]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 1 CREATE (u)-[:NEIGHBOUR]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 6 CREATE (u)-[:NOT_NEIGHBOUR]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 0 CREATE (u)-[:NOT_NEIGHBOUR]->(v);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `country`: "Austria", `value`: 6});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `country`: "Hungary", `value`: 7});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `country`: "Romania", `value`: 8});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3, `country`: "Bulgaria", `value`: 9});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 4, `country`: "Spain", `value`: 10});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 5, `country`: "Latvia", `value`: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 6, `country`: "Russia", `value`: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 7, `country`: "Poland", `value`: 13});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 8, `country`: "Czech Republic", `value`: 14});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 9, `country`: "Moldova", `value`: 15});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`NEIGHBOUR`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 1 CREATE (u)-[:`NEIGHBOUR`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 6 CREATE (u)-[:`NOT_NEIGHBOUR`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 0 CREATE (u)-[:`NOT_NEIGHBOUR`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,11 +1,11 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, id: "0", country: "Croatia", browser: "Chrome", content: "yes"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, id: "1", country: "United Kingdom", browser: "Chrome", content: "thanks"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, id: "2", country: "Germany", content: "LOL"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, id: "3", country: "France", browser: "Firefox", content: "I see"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, id: "4", country: "Italy", browser: "Internet Explorer", content: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:LIKES]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 2 CREATE (u)-[:VISITED]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:FOLLOWS]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `id`: "0", `country`: "Croatia", `browser`: "Chrome", `content`: "yes"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `id`: "1", `country`: "United Kingdom", `browser`: "Chrome", `content`: "thanks"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `id`: "2", `country`: "Germany", `content`: "LOL"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `id`: "3", `country`: "France", `browser`: "Firefox", `content`: "I see"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `id`: "4", `country`: "Italy", `browser`: "Internet Explorer", `content`: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`LIKES`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 2 CREATE (u)-[:`VISITED`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`FOLLOWS`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,4 +1,4 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, value_bool: false, value_boolean: true, value_integer: 5, value_float: 2.718, value_double: 3.141, value_short: 4, value_str: "hello", id: "0", value_char: "world", value_int: 1, value_long: 2, value_byte: 3});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `value_bool`: false, `value_boolean`: true, `value_integer`: 5, `value_float`: 2.718, `value_double`: 3.141, `value_short`: 4, `value_str`: "hello", `id`: "0", `value_char`: "world", `value_int`: 1, `value_long`: 2, `value_byte`: 3});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: 0});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: 1});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", country: "Germany", id: 2});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: 3});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: 4});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: 0});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: 1});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `country`: "Germany", `id`: 2});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: 3});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: 4});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", browser: "", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `browser`: "", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,10 +1,10 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, country: "Croatia", browser: "Chrome", content: "yes"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, country: "United Kingdom", browser: "Chrome", content: "thanks"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, country: "Germany", content: "LOL"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, country: "France", browser: "Firefox", content: "I see"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, country: "Italy", browser: "Internet Explorer", content: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:KNOWS {value: 5}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:KNOWS {value: 6}]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `country`: "Croatia", `browser`: "Chrome", `content`: "yes"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `country`: "United Kingdom", `browser`: "Chrome", `content`: "thanks"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `country`: "Germany", `content`: "LOL"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `country`: "France", `browser`: "Firefox", `content`: "I see"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `country`: "Italy", `browser`: "Internet Explorer", `content`: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`KNOWS` {`value`: 5}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:`KNOWS` {`value`: 6}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,18 +1,18 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment:First:Second {__mg_id__: 0, content: "yes", browser: "Chrome", id: "0", country: "Croatia"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:First:Second {__mg_id__: 1, content: "thanks", browser: "Chrome", id: "1", country: "United Kingdom"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:First:Second {__mg_id__: 2, content: "LOL", id: "2", country: "Germany"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:First:Second {__mg_id__: 3, content: "I see", browser: "Firefox", id: "3", country: "France"});
|
||||
CREATE (:__mg_vertex__:Message:Comment:First:Second {__mg_id__: 4, content: "fine", browser: "Internet Explorer", id: "4", country: "Italy"});
|
||||
CREATE (:__mg_vertex__:Forum:First:Second {__mg_id__: 5, title: "General", id: "0"});
|
||||
CREATE (:__mg_vertex__:Forum:First:Second {__mg_id__: 6, title: "Support", id: "1"});
|
||||
CREATE (:__mg_vertex__:Forum:First:Second {__mg_id__: 7, title: "Music", id: "2"});
|
||||
CREATE (:__mg_vertex__:Forum:First:Second {__mg_id__: 8, title: "Film", id: "3"});
|
||||
CREATE (:__mg_vertex__:Forum:First:Second {__mg_id__: 9, title: "Programming", id: "4"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 5 CREATE (u)-[:POSTED_ON]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 6 CREATE (u)-[:POSTED_ON]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 7 CREATE (u)-[:POSTED_ON]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 8 CREATE (u)-[:POSTED_ON]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 9 CREATE (u)-[:POSTED_ON]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`First`:`Second` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `id`: "0", `country`: "Croatia"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`First`:`Second` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `id`: "1", `country`: "United Kingdom"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`First`:`Second` {__mg_id__: 2, `content`: "LOL", `id`: "2", `country`: "Germany"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`First`:`Second` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `id`: "3", `country`: "France"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment`:`First`:`Second` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `id`: "4", `country`: "Italy"});
|
||||
CREATE (:__mg_vertex__:`Forum`:`First`:`Second` {__mg_id__: 5, `title`: "General", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Forum`:`First`:`Second` {__mg_id__: 6, `title`: "Support", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Forum`:`First`:`Second` {__mg_id__: 7, `title`: "Music", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Forum`:`First`:`Second` {__mg_id__: 8, `title`: "Film", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Forum`:`First`:`Second` {__mg_id__: 9, `title`: "Programming", `id`: "4"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 5 CREATE (u)-[:`POSTED_ON`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 6 CREATE (u)-[:`POSTED_ON`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 7 CREATE (u)-[:`POSTED_ON`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 8 CREATE (u)-[:`POSTED_ON`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 9 CREATE (u)-[:`POSTED_ON`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,18 +1,18 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Movie {__mg_id__: 0, year: 1999, movieId: "tt0133093", title: "The Matrix"});
|
||||
CREATE (:__mg_vertex__:Movie:Sequel {__mg_id__: 1, year: 2003, movieId: "tt0234215", title: "The Matrix Reloaded"});
|
||||
CREATE (:__mg_vertex__:Movie:Sequel {__mg_id__: 2, year: 2003, movieId: "tt0242653", title: "The Matrix Revolutions"});
|
||||
CREATE (:__mg_vertex__:Actor {__mg_id__: 3, name: "Keanu Reeves", personId: "keanu"});
|
||||
CREATE (:__mg_vertex__:Actor {__mg_id__: 4, name: "Laurence Fishburne", personId: "laurence"});
|
||||
CREATE (:__mg_vertex__:Actor {__mg_id__: 5, name: "Carrie-Anne Moss", personId: "carrieanne"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 0 CREATE (u)-[:ACTED_IN {role: "Neo"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 1 CREATE (u)-[:ACTED_IN {role: "Neo"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 2 CREATE (u)-[:ACTED_IN {role: "Neo"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:ACTED_IN {role: "Morpheus"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 1 CREATE (u)-[:ACTED_IN {role: "Morpheus"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 2 CREATE (u)-[:ACTED_IN {role: "Morpheus"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 0 CREATE (u)-[:ACTED_IN {role: "Trinity"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 1 CREATE (u)-[:ACTED_IN {role: "Trinity"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 2 CREATE (u)-[:ACTED_IN {role: "Trinity"}]->(v);
|
||||
CREATE (:__mg_vertex__:`Movie` {__mg_id__: 0, `year`: 1999, `movieId`: "tt0133093", `title`: "The Matrix"});
|
||||
CREATE (:__mg_vertex__:`Movie`:`Sequel` {__mg_id__: 1, `year`: 2003, `movieId`: "tt0234215", `title`: "The Matrix Reloaded"});
|
||||
CREATE (:__mg_vertex__:`Movie`:`Sequel` {__mg_id__: 2, `year`: 2003, `movieId`: "tt0242653", `title`: "The Matrix Revolutions"});
|
||||
CREATE (:__mg_vertex__:`Actor` {__mg_id__: 3, `name`: "Keanu Reeves", `personId`: "keanu"});
|
||||
CREATE (:__mg_vertex__:`Actor` {__mg_id__: 4, `name`: "Laurence Fishburne", `personId`: "laurence"});
|
||||
CREATE (:__mg_vertex__:`Actor` {__mg_id__: 5, `name`: "Carrie-Anne Moss", `personId`: "carrieanne"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 0 CREATE (u)-[:`ACTED_IN` {`role`: "Neo"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 1 CREATE (u)-[:`ACTED_IN` {`role`: "Neo"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 3 AND v.__mg_id__ = 2 CREATE (u)-[:`ACTED_IN` {`role`: "Neo"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 0 CREATE (u)-[:`ACTED_IN` {`role`: "Morpheus"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 1 CREATE (u)-[:`ACTED_IN` {`role`: "Morpheus"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 2 CREATE (u)-[:`ACTED_IN` {`role`: "Morpheus"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 0 CREATE (u)-[:`ACTED_IN` {`role`: "Trinity"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 1 CREATE (u)-[:`ACTED_IN` {`role`: "Trinity"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 2 CREATE (u)-[:`ACTED_IN` {`role`: "Trinity"}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,22 +1,22 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, country: "Croatia", value: 1});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, country: "Germany", value: 2});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, country: "United Kingdom", value: 3});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3, country: "France", value: 4});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 4, country: "Italy", value: 5});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 5, country: "Austria", value: 6});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 6, country: "Hungary", value: 7});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 7, country: "Romania", value: 8});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 8, country_id: 4, country: "Bulgaria", value: 9});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 9, country_id: 5, country: "Spain", value: 10});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 10, country_id: 6, country: "Latvia", value: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 11, country_id: 7, country: "Russia", value: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12, country_id: 8, country: "Poland", value: 13});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 13, country_id: 9, country: "Czech Republic", value: 14});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 14, country_id: 10, country: "Moldova", value: 15});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 6 CREATE (u)-[:NEIGHBOUR]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 7 AND v.__mg_id__ = 6 CREATE (u)-[:NEIGHBOUR]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 11 CREATE (u)-[:NOT_NEIGHBOUR]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 5 CREATE (u)-[:NOT_NEIGHBOUR]->(v);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `country`: "Croatia", `value`: 1});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `country`: "Germany", `value`: 2});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `country`: "United Kingdom", `value`: 3});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3, `country`: "France", `value`: 4});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 4, `country`: "Italy", `value`: 5});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 5, `country`: "Austria", `value`: 6});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 6, `country`: "Hungary", `value`: 7});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 7, `country`: "Romania", `value`: 8});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 8, `country_id`: 4, `country`: "Bulgaria", `value`: 9});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 9, `country_id`: 5, `country`: "Spain", `value`: 10});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 10, `country_id`: 6, `country`: "Latvia", `value`: 11});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 11, `country_id`: 7, `country`: "Russia", `value`: 12});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 12, `country_id`: 8, `country`: "Poland", `value`: 13});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 13, `country_id`: 9, `country`: "Czech Republic", `value`: 14});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 14, `country_id`: 10, `country`: "Moldova", `value`: 15});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 6 CREATE (u)-[:`NEIGHBOUR`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 7 AND v.__mg_id__ = 6 CREATE (u)-[:`NEIGHBOUR`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 9 AND v.__mg_id__ = 11 CREATE (u)-[:`NOT_NEIGHBOUR`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 10 AND v.__mg_id__ = 5 CREATE (u)-[:`NOT_NEIGHBOUR`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,17 +1,17 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, value: 6, country: "Austria"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, value: 7, country: "Hungary"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, value: 8, country: "Romania"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3, value: 9, country: "Bulgaria"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 4, value: 10, country: "Spain"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 5, value: 11, country: "Latvia"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 6, value: 12, country: "Russia"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 7, value: 13, country: "Poland"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 8, value: 14, country: "Czech Republic"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 9, value: 15, country: "Moldova"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:NEIGHBOUR {value: "test"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 1 CREATE (u)-[:NEIGHBOUR {value: "hello"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 6 CREATE (u)-[:NOT_NEIGHBOUR {value: "world"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 0 CREATE (u)-[:NOT_NEIGHBOUR {value: "to properties"}]->(v);
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 0, `value`: 6, `country`: "Austria"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 1, `value`: 7, `country`: "Hungary"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 2, `value`: 8, `country`: "Romania"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 3, `value`: 9, `country`: "Bulgaria"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 4, `value`: 10, `country`: "Spain"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 5, `value`: 11, `country`: "Latvia"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 6, `value`: 12, `country`: "Russia"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 7, `value`: 13, `country`: "Poland"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 8, `value`: 14, `country`: "Czech Republic"});
|
||||
CREATE (:__mg_vertex__ {__mg_id__: 9, `value`: 15, `country`: "Moldova"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`NEIGHBOUR` {`value`: "test"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 2 AND v.__mg_id__ = 1 CREATE (u)-[:`NEIGHBOUR` {`value`: "hello"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 4 AND v.__mg_id__ = 6 CREATE (u)-[:`NOT_NEIGHBOUR` {`value`: "world"}]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 5 AND v.__mg_id__ = 0 CREATE (u)-[:`NOT_NEIGHBOUR` {`value`: "to properties"}]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,11 +1,11 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, id: "0", country: "Croatia", browser: "Chrome", content: "yes"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, id: "1", country: "United Kingdom", browser: "Chrome", content: "thanks"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, id: "2", country: "Germany", content: "LOL"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, id: "3", country: "France", browser: "Firefox", content: "I see"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, id: "4", country: "Italy", browser: "Internet Explorer", content: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:TYPE]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 2 CREATE (u)-[:TYPE]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:TYPE]->(v);
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `id`: "0", `country`: "Croatia", `browser`: "Chrome", `content`: "yes"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `id`: "1", `country`: "United Kingdom", `browser`: "Chrome", `content`: "thanks"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `id`: "2", `country`: "Germany", `content`: "LOL"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `id`: "3", `country`: "France", `browser`: "Firefox", `content`: "I see"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `id`: "4", `country`: "Italy", `browser`: "Internet Explorer", `content`: "fine"});
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 1 CREATE (u)-[:`TYPE`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND v.__mg_id__ = 2 CREATE (u)-[:`TYPE`]->(v);
|
||||
MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND v.__mg_id__ = 2 CREATE (u)-[:`TYPE`]->(v);
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: " Croatia ", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", browser: " ", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: " I see ", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: " fine", browser: "Internet Explorer ", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: " Croatia ", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `browser`: " ", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: " I see ", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: " fine", `browser`: "Internet Explorer ", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -1,8 +1,8 @@
|
||||
CREATE INDEX ON :__mg_vertex__(__mg_id__);
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 0, content: "yes", browser: "Chrome", country: "Croatia", id: "0"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 1, content: "thanks", browser: "Chrome", country: "United Kingdom", id: "1"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 2, content: "LOL", country: "Germany", id: "2"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 3, content: "I see", browser: "Firefox", country: "France", id: "3"});
|
||||
CREATE (:__mg_vertex__:Message:Comment {__mg_id__: 4, content: "fine", browser: "Internet Explorer", country: "Italy", id: "4"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 0, `content`: "yes", `browser`: "Chrome", `country`: "Croatia", `id`: "0"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 1, `content`: "thanks", `browser`: "Chrome", `country`: "United Kingdom", `id`: "1"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 2, `content`: "LOL", `country`: "Germany", `id`: "2"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 3, `content`: "I see", `browser`: "Firefox", `country`: "France", `id`: "3"});
|
||||
CREATE (:__mg_vertex__:`Message`:`Comment` {__mg_id__: 4, `content`: "fine", `browser`: "Internet Explorer", `country`: "Italy", `id`: "4"});
|
||||
DROP INDEX ON :__mg_vertex__(__mg_id__);
|
||||
MATCH (u) REMOVE u:__mg_vertex__, u.__mg_id__;
|
||||
|
@ -334,7 +334,7 @@ TEST(DumpTest, VertexWithSingleLabel) {
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(stream.GetResults(), kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:Label1 {__mg_id__: 0});",
|
||||
"CREATE (:__mg_vertex__:`Label1` {__mg_id__: 0});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
@ -344,7 +344,7 @@ TEST(DumpTest, VertexWithMultipleLabels) {
|
||||
storage::Storage db;
|
||||
{
|
||||
auto dba = db.Access();
|
||||
CreateVertex(&dba, {"Label1", "Label2"}, {}, false);
|
||||
CreateVertex(&dba, {"Label1", "Label 2"}, {}, false);
|
||||
ASSERT_FALSE(dba.Commit().HasError());
|
||||
}
|
||||
|
||||
@ -357,7 +357,7 @@ TEST(DumpTest, VertexWithMultipleLabels) {
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(stream.GetResults(), kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:Label1:Label2 {__mg_id__: 0});",
|
||||
"CREATE (:__mg_vertex__:`Label1`:`Label 2` {__mg_id__: 0});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
@ -380,7 +380,7 @@ TEST(DumpTest, VertexWithSingleProperty) {
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(stream.GetResults(), kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 0, prop: 42});",
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 0, `prop`: 42});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
@ -412,6 +412,39 @@ TEST(DumpTest, MultipleVertices) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(DumpTest, PropertyValue) {
|
||||
storage::Storage db;
|
||||
{
|
||||
auto dba = db.Access();
|
||||
auto null_value = storage::PropertyValue();
|
||||
auto int_value = storage::PropertyValue(13);
|
||||
auto bool_value = storage::PropertyValue(true);
|
||||
auto double_value = storage::PropertyValue(-1.2);
|
||||
auto str_value = storage::PropertyValue("hello 'world'");
|
||||
auto map_value = storage::PropertyValue(
|
||||
{{"prop 1", int_value}, {"prop`2`", bool_value}});
|
||||
auto list_value =
|
||||
storage::PropertyValue({map_value, null_value, double_value});
|
||||
CreateVertex(&dba, {}, {{"p1", list_value}, {"p2", str_value}}, false);
|
||||
ASSERT_FALSE(dba.Commit().HasError());
|
||||
}
|
||||
|
||||
{
|
||||
ResultStreamFaker stream(&db);
|
||||
query::AnyStream query_stream(&stream, utils::NewDeleteResource());
|
||||
{
|
||||
auto acc = db.Access();
|
||||
query::DbAccessor dba(&acc);
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(
|
||||
stream.GetResults(), kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 0, `p1`: [{`prop 1`: 13, "
|
||||
"`prop``2```: true}, Null, -1.2], `p2`: \"hello \\'world\\'\"});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(hicpp-special-member-functions)
|
||||
TEST(DumpTest, SingleEdge) {
|
||||
storage::Storage db;
|
||||
@ -436,7 +469,7 @@ TEST(DumpTest, SingleEdge) {
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 0});",
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 1});",
|
||||
"MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND "
|
||||
"v.__mg_id__ = 1 CREATE (u)-[:EdgeType]->(v);",
|
||||
"v.__mg_id__ = 1 CREATE (u)-[:`EdgeType`]->(v);",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
@ -450,8 +483,8 @@ TEST(DumpTest, MultipleEdges) {
|
||||
auto v = CreateVertex(&dba, {}, {}, false);
|
||||
auto w = CreateVertex(&dba, {}, {}, false);
|
||||
CreateEdge(&dba, &u, &v, "EdgeType", {}, false);
|
||||
CreateEdge(&dba, &v, &u, "EdgeType", {}, false);
|
||||
CreateEdge(&dba, &v, &w, "EdgeType", {}, false);
|
||||
CreateEdge(&dba, &v, &u, "EdgeType 2", {}, false);
|
||||
CreateEdge(&dba, &v, &w, "EdgeType `!\"", {}, false);
|
||||
ASSERT_FALSE(dba.Commit().HasError());
|
||||
}
|
||||
|
||||
@ -469,11 +502,11 @@ TEST(DumpTest, MultipleEdges) {
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 1});",
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 2});",
|
||||
"MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND "
|
||||
"v.__mg_id__ = 1 CREATE (u)-[:EdgeType]->(v);",
|
||||
"v.__mg_id__ = 1 CREATE (u)-[:`EdgeType`]->(v);",
|
||||
"MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND "
|
||||
"v.__mg_id__ = 0 CREATE (u)-[:EdgeType]->(v);",
|
||||
"v.__mg_id__ = 0 CREATE (u)-[:`EdgeType 2`]->(v);",
|
||||
"MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 1 AND "
|
||||
"v.__mg_id__ = 2 CREATE (u)-[:EdgeType]->(v);",
|
||||
"v.__mg_id__ = 2 CREATE (u)-[:`EdgeType ``!\"`]->(v);",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
@ -503,7 +536,7 @@ TEST(DumpTest, EdgeWithProperties) {
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 0});",
|
||||
"CREATE (:__mg_vertex__ {__mg_id__: 1});",
|
||||
"MATCH (u:__mg_vertex__), (v:__mg_vertex__) WHERE u.__mg_id__ = 0 AND "
|
||||
"v.__mg_id__ = 1 CREATE (u)-[:EdgeType {prop: 13}]->(v);",
|
||||
"v.__mg_id__ = 1 CREATE (u)-[:`EdgeType` {`prop`: 13}]->(v);",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
@ -513,14 +546,14 @@ TEST(DumpTest, IndicesKeys) {
|
||||
storage::Storage db;
|
||||
{
|
||||
auto dba = db.Access();
|
||||
CreateVertex(&dba, {"Label1", "Label2"}, {{"p", storage::PropertyValue(1)}},
|
||||
false);
|
||||
CreateVertex(&dba, {"Label1", "Label 2"},
|
||||
{{"p", storage::PropertyValue(1)}}, false);
|
||||
ASSERT_FALSE(dba.Commit().HasError());
|
||||
}
|
||||
ASSERT_TRUE(
|
||||
db.CreateIndex(db.NameToLabel("Label1"), db.NameToProperty("prop")));
|
||||
ASSERT_TRUE(
|
||||
db.CreateIndex(db.NameToLabel("Label2"), db.NameToProperty("prop")));
|
||||
db.CreateIndex(db.NameToLabel("Label 2"), db.NameToProperty("prop `")));
|
||||
|
||||
{
|
||||
ResultStreamFaker stream(&db);
|
||||
@ -530,10 +563,11 @@ TEST(DumpTest, IndicesKeys) {
|
||||
query::DbAccessor dba(&acc);
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(stream.GetResults(), "CREATE INDEX ON :Label1(prop);",
|
||||
"CREATE INDEX ON :Label2(prop);", kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:Label1:Label2 {__mg_id__: 0, p: 1});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
VerifyQueries(
|
||||
stream.GetResults(), "CREATE INDEX ON :`Label1`(`prop`);",
|
||||
"CREATE INDEX ON :`Label 2`(`prop ```);", kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:`Label1`:`Label 2` {__mg_id__: 0, `p`: 1});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
|
||||
@ -542,11 +576,12 @@ TEST(DumpTest, ExistenceConstraints) {
|
||||
storage::Storage db;
|
||||
{
|
||||
auto dba = db.Access();
|
||||
CreateVertex(&dba, {"Label"}, {{"prop", storage::PropertyValue(1)}}, false);
|
||||
CreateVertex(&dba, {"L`abel 1"}, {{"prop", storage::PropertyValue(1)}},
|
||||
false);
|
||||
ASSERT_FALSE(dba.Commit().HasError());
|
||||
}
|
||||
{
|
||||
auto res = db.CreateExistenceConstraint(db.NameToLabel("Label"),
|
||||
auto res = db.CreateExistenceConstraint(db.NameToLabel("L`abel 1"),
|
||||
db.NameToProperty("prop"));
|
||||
ASSERT_TRUE(res.HasValue());
|
||||
ASSERT_TRUE(res.GetValue());
|
||||
@ -560,11 +595,12 @@ TEST(DumpTest, ExistenceConstraints) {
|
||||
query::DbAccessor dba(&acc);
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(stream.GetResults(),
|
||||
"CREATE CONSTRAINT ON (u:Label) ASSERT EXISTS (u.prop);",
|
||||
kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:Label {__mg_id__: 0, prop: 1});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
VerifyQueries(
|
||||
stream.GetResults(),
|
||||
"CREATE CONSTRAINT ON (u:`L``abel 1`) ASSERT EXISTS (u.`prop`);",
|
||||
kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:`L``abel 1` {__mg_id__: 0, `prop`: 1});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
|
||||
@ -599,13 +635,15 @@ TEST(DumpTest, UniqueConstraints) {
|
||||
query::DbAccessor dba(&acc);
|
||||
query::DumpDatabaseToCypherQueries(&dba, &query_stream);
|
||||
}
|
||||
VerifyQueries(
|
||||
stream.GetResults(),
|
||||
"CREATE CONSTRAINT ON (u:Label) ASSERT u.prop, u.prop2 IS UNIQUE;",
|
||||
kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:Label {__mg_id__: 0, prop: 1, prop2: 2});",
|
||||
"CREATE (:__mg_vertex__:Label {__mg_id__: 1, prop: 2, prop2: 2});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
VerifyQueries(stream.GetResults(),
|
||||
"CREATE CONSTRAINT ON (u:`Label`) ASSERT u.`prop`, u.`prop2` "
|
||||
"IS UNIQUE;",
|
||||
kCreateInternalIndex,
|
||||
"CREATE (:__mg_vertex__:`Label` {__mg_id__: 0, `prop`: 1, "
|
||||
"`prop2`: 2});",
|
||||
"CREATE (:__mg_vertex__:`Label` {__mg_id__: 1, `prop`: 2, "
|
||||
"`prop2`: 2});",
|
||||
kDropInternalIndex, kRemoveInternalLabelProperty);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user