I'm trying to migrate to APOC 4.2.0.4 and right now don't know how to rewrite the following constructions:
session.query("CALL apoc.index.list() YIELD name CALL apoc.index.remove(name) YIELD name AS removedIndexName RETURN removedIndexName", new HashMap<>());
and the same for the following:
if (!triggerExists("HAS_VALUE_ON_CREATED_RELATIONSHIPS_TRIGGER")) {
session.query(
"CALL apoc.trigger.add('HAS_VALUE_ON_CREATED_RELATIONSHIPS_TRIGGER', \"UNWIND $createdRelationships AS r WITH r WHERE type(r) = 'HAS_VALUE_ON' CALL apoc.index.addRelationship(r, keys(r)) RETURN true\", {phase:'before'})",
new HashMap<>());
}
if (!triggerExists("HAS_VALUE_ON_ASSIGNED_RELATIONSHIP_PROPERTIES_TRIGGER")) {
session.query(
"CALL apoc.trigger.add('HAS_VALUE_ON_ASSIGNED_RELATIONSHIP_PROPERTIES_TRIGGER', \"UNWIND keys({assignedRelationshipProperties}) AS key UNWIND {assignedRelationshipProperties}[key] AS map WITH map WHERE type(map.relationship) = 'HAS_VALUE_ON' CALL apoc.index.addRelationship(map.relationship, keys(map.relationship)) RETURN true\", {phase:'before'})",
new HashMap<>());
}
if (!triggerExists("HAS_VALUE_ON_DELETED_RELATIONSHIPS_TRIGGER")) {
session.query(
"CALL apoc.trigger.add('HAS_VALUE_ON_DELETED_RELATIONSHIPS_TRIGGER', \"UNWIND {deletedRelationships} AS r WITH r WHERE type(r) = 'HAS_VALUE_ON' CALL apoc.index.removeRelationshipByName('HAS_VALUE_ON', r) RETURN true\", {phase:'before'})",
new HashMap<>());
}
if (!triggerExists("HAS_VALUE_ON_REMOVED_RELATIONSHIP_PROPERTIES_TRIGGER")) {
session.query(
"CALL apoc.trigger.add('HAS_VALUE_ON_REMOVED_RELATIONSHIP_PROPERTIES_TRIGGER', \"UNWIND keys({removedRelationshipProperties}) AS key UNWIND {removedRelationshipProperties}[key] AS map WITH map WHERE type(map.relationship) = 'HAS_VALUE_ON' CALL apoc.index.addRelationship(map.relationship, keys(map.relationship)) RETURN true\", {phase:'before'})",
new HashMap<>());
}
looks like apoc.index.list() was removed from the library. What should I use instead of this right now?