sqlite

package
v0.0.0-...-dbba89f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteGraphStore

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

SQLiteGraphStore implements GraphStore using a dedicated SQLite DB file. It uses recursive CTEs for graph traversal. For vector storage use vector.SQLiteVectorStore with a separate DB file.

func NewSQLiteAdapter

func NewSQLiteAdapter(config *graph.GraphConfig) (*SQLiteGraphStore, error)

NewSQLiteAdapter opens (or creates) a SQLite database at path and initialises the graph schema (nodes + edges tables).

func (*SQLiteGraphStore) Close

func (s *SQLiteGraphStore) Close() error

Close implements GraphStore.

func (*SQLiteGraphStore) CreateRelationship

func (s *SQLiteGraphStore) CreateRelationship(_ context.Context, edge *schema.Edge) error

func (*SQLiteGraphStore) DeleteBatch

func (s *SQLiteGraphStore) DeleteBatch(ctx context.Context, nodeIDs []string, edgeIDs []string) error

func (*SQLiteGraphStore) DeleteGraphBySessionID

func (s *SQLiteGraphStore) DeleteGraphBySessionID(ctx context.Context, sessionID string) error

DeleteGraphBySessionID implements GraphStore.

func (*SQLiteGraphStore) DeleteNode

func (s *SQLiteGraphStore) DeleteNode(_ context.Context, nodeID string) error

func (*SQLiteGraphStore) DeleteRelationship

func (s *SQLiteGraphStore) DeleteRelationship(_ context.Context, edgeID string) error

func (*SQLiteGraphStore) FindConnected

func (s *SQLiteGraphStore) FindConnected(_ context.Context, nodeID string, edgeTypes []schema.EdgeType) ([]*schema.Node, error)

func (*SQLiteGraphStore) FindNodesByEntity

func (s *SQLiteGraphStore) FindNodesByEntity(_ context.Context, entityName string, entityType schema.NodeType) ([]*schema.Node, error)

func (*SQLiteGraphStore) FindNodesByProperty

func (s *SQLiteGraphStore) FindNodesByProperty(_ context.Context, property string, value interface{}) ([]*schema.Node, error)

func (*SQLiteGraphStore) FindNodesByType

func (s *SQLiteGraphStore) FindNodesByType(_ context.Context, nodeType schema.NodeType) ([]*schema.Node, error)

func (*SQLiteGraphStore) FindPath

func (s *SQLiteGraphStore) FindPath(_ context.Context, fromNodeID, toNodeID string, maxDepth int) ([]*schema.Node, error)

func (*SQLiteGraphStore) GetConnectedComponents

func (s *SQLiteGraphStore) GetConnectedComponents(_ context.Context) ([][]string, error)

func (*SQLiteGraphStore) GetEdgeCount

func (s *SQLiteGraphStore) GetEdgeCount(_ context.Context) (int64, error)

func (*SQLiteGraphStore) GetNode

func (s *SQLiteGraphStore) GetNode(_ context.Context, nodeID string) (*schema.Node, error)

func (*SQLiteGraphStore) GetNodeCount

func (s *SQLiteGraphStore) GetNodeCount(_ context.Context) (int64, error)

func (*SQLiteGraphStore) GetRelationship

func (s *SQLiteGraphStore) GetRelationship(_ context.Context, edgeID string) (*schema.Edge, error)

func (*SQLiteGraphStore) Health

func (s *SQLiteGraphStore) Health(_ context.Context) error

Health implements GraphStore.

func (*SQLiteGraphStore) StoreBatch

func (s *SQLiteGraphStore) StoreBatch(ctx context.Context, nodes []*schema.Node, edges []*schema.Edge) error

func (*SQLiteGraphStore) StoreNode

func (s *SQLiteGraphStore) StoreNode(_ context.Context, node *schema.Node) error

func (*SQLiteGraphStore) TraverseGraph

func (s *SQLiteGraphStore) TraverseGraph(_ context.Context, startNodeID string, depth int, _ map[string]interface{}) ([]*schema.Node, error)

func (*SQLiteGraphStore) UpdateNode

func (s *SQLiteGraphStore) UpdateNode(ctx context.Context, node *schema.Node) error

func (*SQLiteGraphStore) UpdateRelationship

func (s *SQLiteGraphStore) UpdateRelationship(ctx context.Context, edge *schema.Edge) error

Jump to

Keyboard shortcuts

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