graphcache

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchNodesByID

func FetchNodesByID(tx graph.Transaction, cache Cache, ids []graph.ID) ([]*graph.Node, error)

func FetchRelationshipsByID

func FetchRelationshipsByID(tx graph.Transaction, cache Cache, ids []graph.ID) (graph.RelationshipSet, error)

func ShallowFetchNodesByID

func ShallowFetchNodesByID(tx graph.Transaction, cache Cache, ids []graph.ID) ([]*graph.Node, error)

func ShallowFetchRelationships

func ShallowFetchRelationships(cache Cache, graphQuery graph.RelationshipQuery) ([]*graph.Relationship, error)

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func New

func New() Cache

func (Cache) CheckedGetNode

func (s Cache) CheckedGetNode(id graph.ID) (*graph.Node, bool)

func (Cache) CheckedGetRelationship

func (s Cache) CheckedGetRelationship(id graph.ID) (*graph.Relationship, bool)

func (Cache) GetNode

func (s Cache) GetNode(id graph.ID) *graph.Node

func (Cache) GetNodes

func (s Cache) GetNodes(ids []graph.ID) ([]*graph.Node, []graph.ID)

func (Cache) GetRelationship

func (s Cache) GetRelationship(id graph.ID) *graph.Relationship

func (Cache) GetRelationships

func (s Cache) GetRelationships(ids []graph.ID) ([]*graph.Relationship, []graph.ID)

func (Cache) NodesCached

func (s Cache) NodesCached() int

func (Cache) PutNodeSet

func (s Cache) PutNodeSet(nodes graph.NodeSet)

func (Cache) PutNodes

func (s Cache) PutNodes(nodes []*graph.Node)

func (Cache) PutRelationshipSet

func (s Cache) PutRelationshipSet(relationships graph.RelationshipSet)

func (Cache) PutRelationships

func (s Cache) PutRelationships(relationships []*graph.Relationship)

func (Cache) RelationshipsCached

func (s Cache) RelationshipsCached() int

func (Cache) SizeOf

func (s Cache) SizeOf() size.Size

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL