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) 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) ListEdges(ctx context.Context) ([]*graph.Edge, error)
- func (s *Store) ListNodes(ctx context.Context) ([]*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
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) 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.
Click to show internal directories.
Click to hide internal directories.