graph

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package graph provides the dominikbraun/graph.Store adapter backed by the Provenance SQLite database. It bridges the in-memory graph library with persistent storage so that cycle detection and traversal work over the full blocked-by subgraph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGraph

func NewGraph(db *dbsqlite.DB) dgraph.Graph[string, ptypes.Task]

NewGraph constructs a directed, cycle-preventing dgraph.Graph using this Store for persistence. This is the canonical way to obtain the blocked-by graph.

Types

type Store

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

Store implements dgraph.Store[string, ptypes.Task] for the blocked-by subgraph. All persistence is delegated to the internal/sqlite.DB.

func NewStore

func NewStore(db *dbsqlite.DB) *Store

NewStore returns a Store backed by the given sqlite.DB.

func (*Store) AddEdge

func (s *Store) AddEdge(sourceHash, targetHash string, _ dgraph.Edge[string]) error

func (*Store) AddVertex

func (s *Store) AddVertex(hash string, value ptypes.Task, _ dgraph.VertexProperties) error

func (*Store) Edge

func (s *Store) Edge(sourceHash, targetHash string) (dgraph.Edge[string], error)

func (*Store) ListEdges

func (s *Store) ListEdges() ([]dgraph.Edge[string], error)

func (*Store) ListVertices

func (s *Store) ListVertices() ([]string, error)

func (*Store) RemoveEdge

func (s *Store) RemoveEdge(sourceHash, targetHash string) error

func (*Store) RemoveVertex

func (s *Store) RemoveVertex(_ string) error

func (*Store) UpdateEdge

func (s *Store) UpdateEdge(sourceHash, targetHash string, _ dgraph.Edge[string]) error

func (*Store) Vertex

func (s *Store) Vertex(hash string) (ptypes.Task, dgraph.VertexProperties, error)

func (*Store) VertexCount

func (s *Store) VertexCount() (int, error)

Jump to

Keyboard shortcuts

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