32bit Node ID

This commit is contained in:
Oxy8
2026-03-06 16:10:52 -03:00
parent 3c487d088b
commit a0c5bec19f
11 changed files with 46 additions and 51 deletions

View File

@@ -12,16 +12,16 @@ func runSelectionQuery(
sparql *AnzoGraphClient,
snapshot GraphResponse,
queryID string,
selectedIDs []int,
selectedIDs []uint32,
includeBNodes bool,
) ([]int, error) {
) ([]uint32, error) {
def, ok := selectionqueries.Get(queryID)
if !ok {
return nil, fmt.Errorf("unknown query_id: %s", queryID)
}
idToNode := make(map[int]selectionqueries.NodeRef, len(snapshot.Nodes))
keyToID := make(map[string]int, len(snapshot.Nodes))
idToNode := make(map[uint32]selectionqueries.NodeRef, len(snapshot.Nodes))
keyToID := make(map[string]uint32, len(snapshot.Nodes))
for _, n := range snapshot.Nodes {
nr := selectionqueries.NodeRef{ID: n.ID, TermType: n.TermType, IRI: n.IRI}
idToNode[n.ID] = nr
@@ -30,4 +30,3 @@ func runSelectionQuery(
return def.Run(ctx, sparql, selectionqueries.Index{IDToNode: idToNode, KeyToID: keyToID}, selectedIDs, includeBNodes)
}