Address review comments
This commit is contained in:
parent
a12a1ea358
commit
5012824e05
@ -72,10 +72,6 @@ constexpr std::string_view GetCodeString(const NotificationCode code) {
|
||||
return "ReplicaPortWarning"sv;
|
||||
case NotificationCode::SET_REPLICA:
|
||||
return "SetReplica"sv;
|
||||
case NotificationCode::SHOW_SCHEMA:
|
||||
return "ShowSchema"sv;
|
||||
case NotificationCode::SHOW_SCHEMAS:
|
||||
return "ShowSchemas"sv;
|
||||
case NotificationCode::START_STREAM:
|
||||
return "StartStream"sv;
|
||||
case NotificationCode::START_ALL_STREAMS:
|
||||
|
@ -44,8 +44,6 @@ enum class NotificationCode : uint8_t {
|
||||
REPLICA_PORT_WARNING,
|
||||
REGISTER_REPLICA,
|
||||
SET_REPLICA,
|
||||
SHOW_SCHEMA,
|
||||
SHOW_SCHEMAS,
|
||||
START_STREAM,
|
||||
START_ALL_STREAMS,
|
||||
STOP_STREAM,
|
||||
|
@ -198,8 +198,10 @@ VertexAccessor &CreateLocalVertexAtomically(const NodeCreationInfo &node_info, F
|
||||
properties.emplace_back(property_id, value);
|
||||
}
|
||||
}
|
||||
// TODO Remove later on since that will be enforced from grammar side
|
||||
MG_ASSERT(!node_info.labels.empty(), "There must be at least one label!");
|
||||
|
||||
if (node_info.labels.empty()) {
|
||||
throw QueryRuntimeException("Primary label must be defined!");
|
||||
}
|
||||
const auto primary_label = node_info.labels[0];
|
||||
std::vector<storage::v3::LabelId> secondary_labels(node_info.labels.begin() + 1, node_info.labels.end());
|
||||
auto maybe_new_node = dba.InsertVertexAndValidate(primary_label, secondary_labels, properties);
|
||||
|
Loading…
Reference in New Issue
Block a user