Documentation
¶
Overview ¶
Package sqlite provides a SQLite implementation of the Store interface.
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) DeleteByFile(ctx context.Context, file string) error
- func (s *Store) DeleteEdgesFrom(ctx context.Context, id string) error
- func (s *Store) DeleteNode(ctx context.Context, id string) error
- func (s *Store) GetEdgesByType(ctx context.Context, edgeType graph.EdgeType) ([]*graph.Edge, error)
- func (s *Store) GetImpactRecursive(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
- func (s *Store) GetInboundEdges(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
- func (s *Store) GetNeighbors(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
- func (s *Store) GetNode(ctx context.Context, id string) (*graph.Node, error)
- func (s *Store) GetStats(ctx context.Context) (*contracts.Stats, error)
- func (s *Store) ListEdges(ctx context.Context) ([]*graph.Edge, error)
- func (s *Store) ListNodes(ctx context.Context) ([]*graph.Node, error)
- func (s *Store) ListNodesByType(ctx context.Context, nodeType graph.NodeType) ([]*graph.Node, error)
- func (s *Store) SaveEdge(ctx context.Context, edge *graph.Edge) error
- func (s *Store) SaveGraph(ctx context.Context, nodes []*graph.Node, edges []*graph.Edge) error
- func (s *Store) SaveNode(ctx context.Context, node *graph.Node) error
- func (s *Store) SearchNodes(ctx context.Context, pattern string) ([]*graph.Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the contracts.Store interface using SQLite.
func (*Store) DeleteByFile ¶
DeleteByFile deletes all nodes associated with a file.
func (*Store) DeleteEdgesFrom ¶
DeleteEdgesFrom deletes all outbound edges from a node.
func (*Store) DeleteNode ¶
DeleteNode deletes a node by its ID.
func (*Store) GetEdgesByType ¶ added in v0.2.2
GetEdgesByType returns all edges of a specific edge type.
func (*Store) GetImpactRecursive ¶ added in v0.1.8
func (s *Store) GetImpactRecursive(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
GetImpactRecursive retrieves all recursive inbound edges and their source nodes for a given node ID.
func (*Store) GetInboundEdges ¶
func (s *Store) GetInboundEdges(ctx context.Context, id string) ([]*graph.Node, []*graph.Edge, error)
GetInboundEdges retrieves all inbound edges and their source nodes for a given node ID.
func (*Store) GetNeighbors ¶
GetNeighbors retrieves all outbound edges and target nodes for a given node ID.
func (*Store) ListNodesByType ¶ added in v0.2.2
func (s *Store) ListNodesByType(ctx context.Context, nodeType graph.NodeType) ([]*graph.Node, error)
ListNodesByType returns all nodes of a specific node type.