Skip to content

Commit 18c0906

Browse files
fix: remove duplicate findEndpointNeighborsBatch in GraphStore (build fix)
The merge of feat/phase5-dashboard-redesign into main introduced a duplicate definition of findEndpointNeighborsBatch(List<String>). Both versions had identical semantics but different implementation style: Kept: the first (from the backend chain PRs #12-16) which uses NodeKind.ENDPOINT.getValue() for type safety and UNWIND/MATCH pattern with $ids parameter. Removed: the second (from phase5) which used string literals ('ENDPOINT', 'WEBSOCKET_ENDPOINT') and IN $nodeIds pattern. Fixes: compilation failure on main (javac error: method already defined). Co-Authored-By: Paperclip <noreply@paperclip.ing>
1 parent 1172238 commit 18c0906

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

src/main/java/io/github/randomcodespace/iq/graph/GraphStore.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -335,31 +335,6 @@ public List<CodeNode> findIncomingNeighbors(String nodeId) {
335335
Map.of("nodeId", nodeId));
336336
}
337337

338-
/**
339-
* Batch-find all ENDPOINT/WEBSOCKET_ENDPOINT neighbors for a list of node IDs in one query.
340-
* Returns a map of sourceNodeId -> list of endpoint neighbor nodes.
341-
*/
342-
public Map<String, List<CodeNode>> findEndpointNeighborsBatch(List<String> nodeIds) {
343-
Map<String, List<CodeNode>> result = new java.util.LinkedHashMap<>();
344-
if (nodeIds.isEmpty()) return result;
345-
try (Transaction tx = graphDb.beginTx()) {
346-
var queryResult = tx.execute(
347-
"MATCH (n:CodeNode)-[]-(m:CodeNode) "
348-
+ "WHERE n.id IN $nodeIds AND m.kind IN ['ENDPOINT', 'WEBSOCKET_ENDPOINT'] "
349-
+ "RETURN n.id AS sourceId, m",
350-
Map.of("nodeIds", nodeIds));
351-
while (queryResult.hasNext()) {
352-
var row = queryResult.next();
353-
String sourceId = (String) row.get("sourceId");
354-
Object val = row.get("m");
355-
if (val instanceof org.neo4j.graphdb.Node neo4jNode) {
356-
result.computeIfAbsent(sourceId, k -> new ArrayList<>()).add(nodeFromNeo4j(neo4jNode));
357-
}
358-
}
359-
}
360-
return result;
361-
}
362-
363338
public long count() {
364339
try (Transaction tx = graphDb.beginTx()) {
365340
var result = tx.execute("MATCH (n:CodeNode) RETURN count(n) AS cnt");

0 commit comments

Comments
 (0)