db

package
v0.0.0-...-0a5fad8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbGraph

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

func NewCockroachDbGraph

func NewCockroachDbGraph(dsn string) (*DbGraph, error)

NewCockroachDbGraph returns a CockroachDbGraph instance that connects to the cockroachdb instance specified by dsn.

func (*DbGraph) Close

func (d *DbGraph) Close() error

Close

func (*DbGraph) Edges

func (d *DbGraph) Edges(fromID, toID uuid.UUID, updatedBefore time.Time) (graph.EdgeIterator, error)
func (d *DbGraph) FindLink(id uuid.UUID) (*graph.Link, error)

FindLink looks up a link bt its ID.

func (d *DbGraph) Links(fromID, toID uuid.UUID, accessedBefore time.Time) (graph.LinkIterator, error)

Links returns an iterator for the set of links whose IDs belong to the [fromID, toID) range were last accessed before provideed value

func (*DbGraph) RemoveStaleEdges

func (d *DbGraph) RemoveStaleEdges(fromID uuid.UUID, updatedBefore time.Time) error

func (*DbGraph) UpsertEdge

func (d *DbGraph) UpsertEdge(edge *graph.Edge) error
func (d *DbGraph) UpsertLink(link *graph.Link) error

UpsertLink

Jump to

Keyboard shortcuts

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