Documentation
¶
Index ¶
- type SQLiteGraphStore
- func (s *SQLiteGraphStore) Close() error
- func (s *SQLiteGraphStore) CreateRelationship(_ context.Context, edge *schema.Edge) error
- func (s *SQLiteGraphStore) DeleteBatch(ctx context.Context, nodeIDs []string, edgeIDs []string) error
- func (s *SQLiteGraphStore) DeleteGraphBySessionID(ctx context.Context, sessionID string) error
- func (s *SQLiteGraphStore) DeleteNode(_ context.Context, nodeID string) error
- func (s *SQLiteGraphStore) DeleteRelationship(_ context.Context, edgeID string) error
- func (s *SQLiteGraphStore) FindConnected(_ context.Context, nodeID string, edgeTypes []schema.EdgeType) ([]*schema.Node, error)
- func (s *SQLiteGraphStore) FindNodesByEntity(_ context.Context, entityName string, entityType schema.NodeType) ([]*schema.Node, error)
- func (s *SQLiteGraphStore) FindNodesByProperty(_ context.Context, property string, value interface{}) ([]*schema.Node, error)
- func (s *SQLiteGraphStore) FindNodesByType(_ context.Context, nodeType schema.NodeType) ([]*schema.Node, error)
- func (s *SQLiteGraphStore) FindPath(_ context.Context, fromNodeID, toNodeID string, maxDepth int) ([]*schema.Node, error)
- func (s *SQLiteGraphStore) GetConnectedComponents(_ context.Context) ([][]string, error)
- func (s *SQLiteGraphStore) GetEdgeCount(_ context.Context) (int64, error)
- func (s *SQLiteGraphStore) GetNode(_ context.Context, nodeID string) (*schema.Node, error)
- func (s *SQLiteGraphStore) GetNodeCount(_ context.Context) (int64, error)
- func (s *SQLiteGraphStore) GetRelationship(_ context.Context, edgeID string) (*schema.Edge, error)
- func (s *SQLiteGraphStore) Health(_ context.Context) error
- func (s *SQLiteGraphStore) StoreBatch(ctx context.Context, nodes []*schema.Node, edges []*schema.Edge) error
- func (s *SQLiteGraphStore) StoreNode(_ context.Context, node *schema.Node) error
- func (s *SQLiteGraphStore) TraverseGraph(_ context.Context, startNodeID string, depth int, _ map[string]interface{}) ([]*schema.Node, error)
- func (s *SQLiteGraphStore) UpdateNode(ctx context.Context, node *schema.Node) error
- func (s *SQLiteGraphStore) UpdateRelationship(ctx context.Context, edge *schema.Edge) error
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 (*SQLiteGraphStore) DeleteBatch ¶
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 (*SQLiteGraphStore) FindNodesByEntity ¶
func (*SQLiteGraphStore) FindNodesByProperty ¶
func (*SQLiteGraphStore) FindNodesByType ¶
func (*SQLiteGraphStore) GetConnectedComponents ¶
func (s *SQLiteGraphStore) GetConnectedComponents(_ context.Context) ([][]string, error)
func (*SQLiteGraphStore) GetEdgeCount ¶
func (s *SQLiteGraphStore) GetEdgeCount(_ context.Context) (int64, error)
func (*SQLiteGraphStore) GetNodeCount ¶
func (s *SQLiteGraphStore) GetNodeCount(_ context.Context) (int64, error)
func (*SQLiteGraphStore) GetRelationship ¶
func (*SQLiteGraphStore) Health ¶
func (s *SQLiteGraphStore) Health(_ context.Context) error
Health implements GraphStore.
func (*SQLiteGraphStore) StoreBatch ¶
func (*SQLiteGraphStore) TraverseGraph ¶
func (*SQLiteGraphStore) UpdateNode ¶
func (*SQLiteGraphStore) UpdateRelationship ¶
Click to show internal directories.
Click to hide internal directories.