Documentation
¶
Overview ¶
Package postgres provides the Postgres reference implementation of memgraph.Store, using pgx and pg_trgm for full-text search.
Suitable for cloud and multi-process / multi-writer deployments.
Tests require a reachable Postgres instance. Set MEMGRAPH_POSTGRES_DSN to a DSN with permissions to create/drop schemas; otherwise tests skip.
Subscribe is in-process only; cross-process notifications via LISTEN/NOTIFY are a future enhancement.
Index ¶
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateGraph(ctx context.Context, in memgraph.GraphInput) (memgraph.Graph, error)
- func (s *Store) DeleteEdge(ctx context.Context, id memgraph.EdgeID) error
- func (s *Store) DescribeSchema(ctx context.Context, graphID memgraph.GraphID) (memgraph.SchemaDescription, error)
- func (s *Store) GetGraph(ctx context.Context, id memgraph.GraphID) (memgraph.Graph, error)
- func (s *Store) GetNodeByID(ctx context.Context, id memgraph.NodeID) (memgraph.Node, error)
- func (s *Store) GetNodeByLineage(ctx context.Context, id memgraph.LineageID, opts memgraph.ReadOpts) (memgraph.Node, error)
- func (s *Store) History(ctx context.Context, id memgraph.LineageID) ([]memgraph.Node, error)
- func (s *Store) Incoming(ctx context.Context, to memgraph.LineageID, opts memgraph.TraverseOpts) ([]memgraph.Edge, error)
- func (s *Store) ListGraphs(ctx context.Context) ([]memgraph.Graph, error)
- func (s *Store) ListNodes(ctx context.Context, graphID memgraph.GraphID, f memgraph.NodeFilter) ([]memgraph.Node, error)
- func (s *Store) ListTags(ctx context.Context, graphID memgraph.GraphID, prefix string, limit int) ([]memgraph.TagFreq, error)
- func (s *Store) Outgoing(ctx context.Context, from memgraph.LineageID, opts memgraph.TraverseOpts) ([]memgraph.Edge, error)
- func (s *Store) PutEdge(ctx context.Context, in memgraph.EdgeInput) (memgraph.Edge, error)
- func (s *Store) PutNode(ctx context.Context, in memgraph.NodeInput) (memgraph.Node, error)
- func (s *Store) Search(ctx context.Context, graphID memgraph.GraphID, q memgraph.SearchQuery) ([]memgraph.SearchHit, error)
- func (s *Store) Subscribe(h memgraph.WriteHandler) (memgraph.Unsubscribe, error)
- func (s *Store) SymlinkManifest(ctx context.Context, graphID memgraph.GraphID) (memgraph.SymlinkManifest, error)
- func (s *Store) Traverse(ctx context.Context, from memgraph.LineageID, opts memgraph.TraverseOpts) (memgraph.TraversalResult, error)
- func (s *Store) UpdateGraphConfig(ctx context.Context, id memgraph.GraphID, patch memgraph.GraphConfigPatch) (memgraph.Graph, 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 is the Postgres-backed memgraph.Store implementation.
func OpenContext ¶
OpenContext is like Open but takes a context for the initial connection and schema application.
func (*Store) CreateGraph ¶
func (*Store) DeleteEdge ¶
func (*Store) DescribeSchema ¶ added in v0.3.0
func (*Store) GetNodeByID ¶
func (*Store) GetNodeByLineage ¶
func (*Store) ListGraphs ¶
func (*Store) Subscribe ¶
func (s *Store) Subscribe(h memgraph.WriteHandler) (memgraph.Unsubscribe, error)
func (*Store) SymlinkManifest ¶
Click to show internal directories.
Click to hide internal directories.