sgnm-neo4j
Version:
neo4j module for nestJs
354 lines (353 loc) • 22.2 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.delete_relation_with_relation_name__must_entered_error = exports.create__must_entered_error = exports.update_has_type_prop_error = exports.update_has_type_prop__must_entered_error = exports.create_node_with_label__must_entered_error = exports.delete_children_nodes_by_id_and_labels__must_entered_error = exports.get_children_count_by_id_and_labels__must_entered_error = exports.get_childrens_children_count_by_id_and_labels__not_found_error = exports.get_childrens_children_count_by_id_and_labels__must_entered_error = exports.set_deleted_true_to_node_and_child_by_id_and_labels__must_entered_error = exports.get_parent_by_id__must_entered_error = exports.get_children_count__must_entered_error = exports.find_by_realm_with_tree_structure__not_entered_error = exports.find_with_children_by_realm_as_tree__not_entered_error = exports.find_by_realm__not_entered_error = exports.add_relation_with_relation_name__create_relation_error = exports.add_relation_with_relation_name__must_entered_error = exports.add_children_relation_by_id_error = exports.find_with_children_by_id_as_tree_error = exports.find_with_children_by_realm_as_tree_error = exports.find_with_children_by_realm_as_tree__find_by_realm_error = exports.tree_structure_not_found_by_realm_name_error = exports.find_by_realm__not_found_error = exports.add_parent_relation_by_id__not_created_error = exports.delete_relation_by_relation_name__not_deleted_error = exports.delete_children_relation_error = exports.update_by_id__update_error = exports.update_by_id__node_not_found = exports.find_node_count_by_classname_error = exports.find_with_children_by_id_and_labels_as_tree__has_not_children_error = exports.delete__get_parent_by_id_error = exports.get_node_without_parent = exports.find_all_by_classname__find_node_count_by_classname_error = exports.delete_children_nodes_by_id_and_labels__not_deleted_error = exports.invalid_label_error = exports.deleteParentRelationError = exports.create_node_with_label_add_parent_by_labelclass_error = exports.create_node__node_not_created_error = exports.create_node_with_label__node_not_created_error = exports.node_not_created = exports.get_children_count_by_id_and_labels__not_found_error = exports.parent_of_child_not_found = exports.root_node_not_found = exports.parent_has_not_children = exports.tree_not_found = exports.node_not_updated = exports.node_not_found = exports.invalid_direction_error = exports.library_server_error = exports.has_children_error = void 0;
exports.undefined_value_recieved = exports.required_fields_must_entered = exports.node_cannot_delete = exports.incorret_operation = exports.delete__update_is_deleted_prop_error = exports.find_children_by_id__must_entered_error = exports.find_parent_by_id__must_entered_error = exports.find_by_name_and_labels_with_active_child_nodes__not_found_error = exports.find_by_name_and_labels_with_active_child_nodes__must_entered_error = exports.find_by_name__must_entered_error = exports.add_children_relation_by_id__relationship_not_created = exports.update_label__must_entered_error = exports.remove_label__must_entered_error = exports.delete__must_entered_error = exports.find_one_node_by_key_must_entered_error = exports.add_relation_must_entered_error = exports.delete_relation_must_entered_error = exports.add_parent_by_label_class_must_entered_error = exports.find_by_id_and_labels_with_tree_structure__must_entered_error = exports.find_by_id_and_labels_with_tree_structure__not_found_error = exports.set_deleted_true_to_node_and_child_by_id_and_labels_not_updated_error = exports.update_selectable_prop__not_updated_error = exports.find_root_node_by_classname__must_entered_error = exports.update_by_id__must_entered_error = exports.create_node__must_entered_error = exports.find_with_children_by_id_and_labels_as_tree__must_entered_error = exports.find_node_count_by_classname__must_entered_error = exports.find_by_id__must_entered_error = exports.find_node_by_id_and_label__not_found_error = exports.find_node_by_id_and_label__must_entered_error = exports.find_by_id_and_labels_with_active_child_node__not_found_error = exports.find_by_id_and_labels_with_active_child_nodes__not_found_error = exports.find_by_id_with_tree_structure__must_entered_error = exports.find_with_children_by_id_as_tree__must_entered_error = exports.find_by_id_and_labels_with_active_child_nodes__must_entered_error = exports.update_selectable_prop__must_entered_error = exports.add_parent_relation_by_id__must_entered_error = void 0;
const custom_error_enum_1 = require("./custom.error.enum");
exports.has_children_error = {
message: "This node has children, you can not delete it",
code: custom_error_enum_1.CustomNeo4jError.HAS_CHILDREN,
};
exports.library_server_error = {
message: "something went wrong with the library server",
code: custom_error_enum_1.CustomNeo4jError.LİBRARY_ERROR,
};
exports.invalid_direction_error = {
message: "please enter proper direction",
code: custom_error_enum_1.CustomNeo4jError.INVALID_DIRECTION,
};
exports.node_not_found = {
message: "This node is not found in the database maybe entered id not found in the database",
code: custom_error_enum_1.CustomNeo4jError.NOT_FOUND,
};
exports.node_not_updated = {
message: "This node is not found in the database maybe entered id not found in the database",
code: custom_error_enum_1.CustomNeo4jError.NODE_NOT_UPDATED,
};
exports.tree_not_found = {
message: "Tree is not found in the database",
code: custom_error_enum_1.CustomNeo4jError.NOT_FOUND,
};
exports.parent_has_not_children = {
message: "This parent has not children",
code: custom_error_enum_1.CustomNeo4jError.HAS_NOT_CHILDREN,
};
exports.root_node_not_found = {
message: "There is not found root node",
code: custom_error_enum_1.CustomNeo4jError.ROOT_NODE_NOT_FOUND,
};
exports.parent_of_child_not_found = {
message: "This child has not a parent",
code: custom_error_enum_1.CustomNeo4jError.PARENT_NOT_FOUND,
};
exports.get_children_count_by_id_and_labels__not_found_error = {
message: "This children count not found by id and labels",
code: custom_error_enum_1.CustomNeo4jError.GET_CHILDREN_COUNT_BY_ID_AND_LABELS_NOT_FOUND,
};
exports.node_not_created = {
message: "Node not created",
code: custom_error_enum_1.CustomNeo4jError.NODE_NOT_CREATED,
};
exports.create_node_with_label__node_not_created_error = {
message: "Node not created maybe entity has missing properties or label is not valid",
code: custom_error_enum_1.CustomNeo4jError.CREATE_NODE_WITH_LABEL__NODE_NOT_CREATED,
};
exports.create_node__node_not_created_error = {
message: "Node not created",
code: custom_error_enum_1.CustomNeo4jError.CREATE_NODE__NODE_NOT_CREATED_ERROR,
};
exports.create_node_with_label_add_parent_by_labelclass_error = {
message: "Node not created",
code: custom_error_enum_1.CustomNeo4jError.CREATE_NODE_WITH_LABEL_ADD_PARENT_BY_LABELCLASS,
};
exports.deleteParentRelationError = {
message: "Relation not deleted",
code: custom_error_enum_1.CustomNeo4jError.CREATE_NODE_WITH_LABEL_ADD_PARENT_BY_LABELCLASS,
};
exports.invalid_label_error = {
message: "This label is not valid",
code: custom_error_enum_1.CustomNeo4jError.INVALID_LABEL_ERROR,
};
exports.delete_children_nodes_by_id_and_labels__not_deleted_error = {
message: "Children id or labels not found in database",
code: custom_error_enum_1.CustomNeo4jError.DELETE_CHILDREN_NODES_BY_ID_AND_LABELS__NOT_DELETED_ERROR,
};
exports.find_all_by_classname__find_node_count_by_classname_error = {
message: "This classname has not used in the any nodess",
code: custom_error_enum_1.CustomNeo4jError.FIND_ALL_BY_CLASSNAME__FIND_NODE_COUNT_BY_CLASSNAME_ERROR,
};
exports.get_node_without_parent = {
message: "This classname has not used in the any node",
code: custom_error_enum_1.CustomNeo4jError.GET_NODE_WITHOUT_PARENT_ERROR,
};
exports.delete__get_parent_by_id_error = {
message: "This parent was not found in the database",
code: custom_error_enum_1.CustomNeo4jError.DELETE__GET_PARENT_BY_ID,
};
exports.find_with_children_by_id_and_labels_as_tree__has_not_children_error = {
message: "This parent was not found in the database",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_ID_AND_LABELS_AS_TREE__HAS_NO_CHILDREN_ERROR,
};
exports.find_node_count_by_classname_error = {
message: "This classname not used any nodes in the database",
code: custom_error_enum_1.CustomNeo4jError.FIND_NODE_COUNT_BY_CLASSNAME_ERROR,
};
exports.update_by_id__node_not_found = {
message: "This node is not found in the database",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_BY_ID__NODE_NOT_FOUND,
};
exports.update_by_id__update_error = {
message: "This node not updated because cypher query or params are invalid",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_BY_ID__UPDATE_ERROR,
};
exports.delete_children_relation_error = {
message: "This relation of children not deleted maybe there is no relation or this children has not a relation defined",
code: custom_error_enum_1.CustomNeo4jError.DELETE_CHILDREN_RELATION_ERROR,
};
exports.delete_relation_by_relation_name__not_deleted_error = {
message: "This relation can be deleted because relation name is not defined or wrong",
code: custom_error_enum_1.CustomNeo4jError.DELETE_RELATION_BY_RELATION_NAME__NOT_DELETED_ERROR,
};
exports.add_parent_relation_by_id__not_created_error = {
message: "This relation can not created because node id's maybe wrong or not found in database or this relationship is already exists",
code: custom_error_enum_1.CustomNeo4jError.ADD_PARENT_RELATION_BY_ID__NOT_CREATED_ERROR,
};
exports.find_by_realm__not_found_error = {
message: "There is no node has this realm name or wrong realm name",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_REALM__NOT_FOUND_ERROR,
};
exports.tree_structure_not_found_by_realm_name_error = {
message: "There is no tree structure by realm name",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_REALM_WITH_TREE_STRUCTURE_ERROR,
};
exports.find_with_children_by_realm_as_tree__find_by_realm_error = {
message: "There is no node has this realm name or wrong realm name",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_REALM_AS_TREE__FIND_BY_REALM_ERROR,
};
exports.find_with_children_by_realm_as_tree_error = {
message: "There is no tree structure by realm",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_REALM_AS_TREE_ERROR,
};
exports.find_with_children_by_id_as_tree_error = {
message: "There is no tree structure by id in the database",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_ID_AS_TREE_ERROR,
};
exports.add_children_relation_by_id_error = {
message: "child_id or target_parent_id is must not empty",
code: custom_error_enum_1.CustomNeo4jError.ADD_CHILDREN_RELATION_BY_ID_ERROR,
};
exports.add_relation_with_relation_name__must_entered_error = {
message: "first_node_id, second_node_id or relationName are must not empty",
code: custom_error_enum_1.CustomNeo4jError.ADD_RELATION_WITH_RELATION_NAME_ERROR,
};
exports.add_relation_with_relation_name__create_relation_error = {
message: "This relation already exists between those two nodes or wrong node id's",
code: custom_error_enum_1.CustomNeo4jError.ADD_RELATION_WITH_RELATION_NAME__CREATE_RELATION_ERROR,
};
exports.find_by_realm__not_entered_error = {
message: "Must entered a realm name",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_REALM__NOT_ENTERED_ERROR,
};
exports.find_with_children_by_realm_as_tree__not_entered_error = {
message: "Must entered a realm name",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_REALM_AS_TREE__NOT_ENTERED_ERROR,
};
exports.find_by_realm_with_tree_structure__not_entered_error = {
message: "Must entered a realm name",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_REALM_WITH_TREE_STRUCTURE__NOT_ENTERED_ERROR,
};
exports.get_children_count__must_entered_error = {
message: "There is no node's id",
code: custom_error_enum_1.CustomNeo4jError.GET_CHILDREN_COUNT__MUST_ENTERED_ERROR,
};
exports.get_parent_by_id__must_entered_error = {
message: "There is no node's id",
code: custom_error_enum_1.CustomNeo4jError.GET_PARENT_BY_ID__MUST_ENTERED_ERROR,
};
exports.set_deleted_true_to_node_and_child_by_id_and_labels__must_entered_error = {
message: "id, label1 and label2 must entered",
code: custom_error_enum_1.CustomNeo4jError.SET_DELETED_TRUE_TO_NODE_AND_CHILD_BY_ID_AND_LABELS__MUST_ENTERED_ERROR,
};
exports.get_childrens_children_count_by_id_and_labels__must_entered_error = {
message: "id, label1, label2 and label3 must entered",
code: custom_error_enum_1.CustomNeo4jError.GET_CHILDRENS_CHILDREN_COUNT_BY_ID_AND_LABELS__MUST_ENTERED_ERROR,
};
exports.get_childrens_children_count_by_id_and_labels__not_found_error = {
message: "",
code: custom_error_enum_1.CustomNeo4jError.GET_CHILDRENS_CHILDREN_COUNT_BY_ID_AND_LABELS__NOT_FOUND_ERROR,
};
exports.get_children_count_by_id_and_labels__must_entered_error = {
message: "id, label1 and label2 must entered",
code: custom_error_enum_1.CustomNeo4jError.GET_CHILDRENS_CHILDREN_COUNT_BY_ID_AND_LABELS__MUST_ENTERED_ERROR,
};
exports.delete_children_nodes_by_id_and_labels__must_entered_error = {
message: "id, label1 and label2 must entered",
code: custom_error_enum_1.CustomNeo4jError.DELETE_CHILDREN_NODES_BY_ID_AND_LABELS__MUST_ENTERED_ERROR,
};
exports.create_node_with_label__must_entered_error = {
message: "entity and label must entered or ",
code: custom_error_enum_1.CustomNeo4jError.CREATE_NODE_WITH_LABEL__MUST_ENTERED_ERROR,
};
exports.update_has_type_prop__must_entered_error = {
message: "id and hasLabeledNode must entered",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_HAS_TYPE_PROP__MUST_ENTERED_ERROR,
};
exports.update_has_type_prop_error = {
message: "field can not updated may be there is not a node with this id or id is not valid",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_HAS_TYPE_PROP__MUST_ENTERED_ERROR,
};
exports.create__must_entered_error = {
message: "entity and label must entered",
code: custom_error_enum_1.CustomNeo4jError.CREATE__MUST_ENTERED_ERROR,
};
exports.delete_relation_with_relation_name__must_entered_error = {
message: "id and relationName must entered",
code: custom_error_enum_1.CustomNeo4jError.DELETE_RELATION_WITH_RELATION_NAME__MUST_ENTERED_ERROR,
};
exports.add_parent_relation_by_id__must_entered_error = {
message: "child_id and parent_id must entered",
code: custom_error_enum_1.CustomNeo4jError.ADD_PARENT_RELATION_BY_ID__MUST_ENTERED_ERROR,
};
exports.update_selectable_prop__must_entered_error = {
message: "id and selectable must entered",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_SELECTABLE_PROP__MUST_ENTERED_ERROR,
};
exports.find_by_id_and_labels_with_active_child_nodes__must_entered_error = {
message: "id, label1 and label2 must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID_AND_LABELS_WITH_ACTIVE_CHILD_NODES__MUST_ENTERED_ERROR,
};
exports.find_with_children_by_id_as_tree__must_entered_error = {
message: "id must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_ID_AS_TREE__MUST_ENTERED_ERROR,
};
exports.find_by_id_with_tree_structure__must_entered_error = {
message: "id must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID_WITH_TREE_STRUCTURE__MUST_ENTERED_ERROR,
};
exports.find_by_id_and_labels_with_active_child_nodes__not_found_error = {
message: "This node not found in database maybe entered id value wrong",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID_AND_LABELS_WITH_ACTIVE_CHILD_NODES__NOT_FOUND_ERROR,
};
exports.find_by_id_and_labels_with_active_child_node__not_found_error = {
message: "Nodes not found according to searched id and label criteria",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID_AND_LABELS_WITH_ACTIVE_CHILD_NODE__NOT_FOUND_ERROR,
};
exports.find_node_by_id_and_label__must_entered_error = {
message: "id and label must be entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_NODE_BY_ID_AND_LABEL__MUST_ENTERED_ERROR,
};
exports.find_node_by_id_and_label__not_found_error = {
message: "Node not found maybe label is invalid or id not found",
code: custom_error_enum_1.CustomNeo4jError.FIND_NODE_BY_ID_AND_LABEL__NOT_FOUND_ERROR,
};
exports.find_by_id__must_entered_error = {
message: "id must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID__MUST_ENTERED_ERROR,
};
exports.find_node_count_by_classname__must_entered_error = {
message: "classname must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_NODE_COUNT_BY_CLASSNAME__MUST_ENTERED_ERROR,
};
exports.find_with_children_by_id_and_labels_as_tree__must_entered_error = {
message: "id, label1 and label2 must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_WITH_CHILDREN_BY_ID_AND_LABELS_AS_TREE__MUST_ENTERED_ERROR,
};
exports.create_node__must_entered_error = {
message: "params and label must entered",
code: custom_error_enum_1.CustomNeo4jError.CREATE_NODE__MUST_ENTERED_ERROR,
};
exports.update_by_id__must_entered_error = {
message: "id and params must entered",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_BY_ID__MUST_ENTERED_ERROR,
};
exports.find_root_node_by_classname__must_entered_error = {
message: "id and params must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_ROOT_NODE_BY_CLASSNAME__MUST_ENTERED_ERROR,
};
exports.update_selectable_prop__not_updated_error = {
message: "Node not updated, id value maybe wrong",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_SELECTABLE_PROP__NOT_UPDATED_ERROR,
};
exports.set_deleted_true_to_node_and_child_by_id_and_labels_not_updated_error = {
message: "There is nothing updated maybe id and labels wrong or node not exists",
code: custom_error_enum_1.CustomNeo4jError.SET_DELETED_TRUE_TO_NODE_AND_CHILD_BY_ID_AND_LABELS__NOT_UPDATED_ERROR,
};
exports.find_by_id_and_labels_with_tree_structure__not_found_error = {
message: "Tree structure not found maybe id and labels wrong",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID_AND_LABELS_WITH_TREE_STRUCTURE__NOT_FOUND_ERROR,
};
exports.find_by_id_and_labels_with_tree_structure__must_entered_error = {
message: "id, label1 and label2 must be entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_ID_AND_LABELS_WITH_TREE_STRUCTURE__MUST_ENTERED_ERROR,
};
exports.add_parent_by_label_class_must_entered_error = {
message: "entity and label must be entered",
code: custom_error_enum_1.CustomNeo4jError.ADD_PARENT_BY_LABEL_CLASS__MUST_ENTERED_ERROR,
};
exports.delete_relation_must_entered_error = {
message: "id must be entered",
code: custom_error_enum_1.CustomNeo4jError.DELETE_RELATION__MUST_ENTERED_ERROR,
};
exports.add_relation_must_entered_error = {
message: "id and target_parent_id must be entered",
code: custom_error_enum_1.CustomNeo4jError.ADD_RELATION__MUST_ENTERED_ERROR,
};
exports.find_one_node_by_key_must_entered_error = {
message: "id must be entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_ONE_NODE_BY_KEY__MUST_ENTERED_ERROR,
};
exports.delete__must_entered_error = {
message: "id must be entered",
code: custom_error_enum_1.CustomNeo4jError.DELETE__MUST_ENTERED_ERROR,
};
exports.remove_label__must_entered_error = {
message: "id and label must be entered",
code: custom_error_enum_1.CustomNeo4jError.REMOVE_LABEL__MUST_ENTERED_ERROR,
};
exports.update_label__must_entered_error = {
message: "id and label must be entered",
code: custom_error_enum_1.CustomNeo4jError.UPDATE_LABEL__MUST_ENTERED_ERROR,
};
exports.add_children_relation_by_id__relationship_not_created = {
message: "This relationship is already exists or wrong child_id and targer_parent_id",
code: custom_error_enum_1.CustomNeo4jError.ADD_CHILDREN_REALTION_BY_ID__RELATIONSHIP_NOT_CREATED,
};
exports.find_by_name__must_entered_error = {
message: "name must be entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_NAME__MUST_ENTERED_ERROR,
};
exports.find_by_name_and_labels_with_active_child_nodes__must_entered_error = {
message: "id, label1 and label2 must entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_NAME_AND_LABELS_WITH_ACTIVE_CHILD_NODES__MUST_ENTERED_ERROR,
};
exports.find_by_name_and_labels_with_active_child_nodes__not_found_error = {
message: "This node not found in database maybe entered id value wrong",
code: custom_error_enum_1.CustomNeo4jError.FIND_BY_NAME_AND_LABELS_WITH_ACTIVE_CHILD_NODES__NOT_FOUND_ERROR,
};
exports.find_parent_by_id__must_entered_error = {
message: "name must be entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_PARENT_BY_ID__MUST_ENTERED_ERROR,
};
exports.find_children_by_id__must_entered_error = {
message: "name must be entered",
code: custom_error_enum_1.CustomNeo4jError.FIND_CHILDREN_BY_ID__MUST_ENTERED_ERROR,
};
exports.delete__update_is_deleted_prop_error = {
message: "is deleted prop of node could not deleted",
code: custom_error_enum_1.CustomNeo4jError.FIND_CHILDREN_BY_ID__MUST_ENTERED_ERROR,
};
exports.incorret_operation = {
message: "operation is incorrect",
code: custom_error_enum_1.CustomNeo4jError.INCORRECT_OPERATION,
};
exports.node_cannot_delete = {
message: "Node can not delete",
code: custom_error_enum_1.CustomNeo4jError.NODE_CANNOT_DELETE,
};
exports.required_fields_must_entered = {
message: "required fields must entered",
code: custom_error_enum_1.CustomNeo4jError.REQUIRED_FIELDS_MUST_ENTERED,
};
exports.undefined_value_recieved = {
message: "fields are null or undefined",
code: custom_error_enum_1.CustomNeo4jError.UNDEFINED_VALUE_RECİEVED,
};