Documentation
¶
Overview ¶
Package postgres
Index ¶
- func Open(ctx context.Context, dsn string) (*pgxpool.Pool, error)
- type Driver
- func (d *Driver) Ancestry(ctx context.Context, hash string) ([]*merkle.Node, error)
- func (d *Driver) AncestryChain(ctx context.Context, hash string) (*storage.Chain, error)
- func (d *Driver) AncestryChains(ctx context.Context, hashes []string) (map[string]*storage.Chain, error)
- func (d *Driver) Close() error
- func (d *Driver) CountSessions(ctx context.Context, opts storage.ListOpts) (storage.SessionStats, error)
- func (d *Driver) DB() *pgxpool.Pool
- func (d *Driver) Depth(ctx context.Context, hash string) (int, error)
- func (d *Driver) Get(ctx context.Context, hash string) (*merkle.Node, error)
- func (d *Driver) GetByParent(ctx context.Context, parentHash *string) ([]*merkle.Node, error)
- func (d *Driver) Has(ctx context.Context, hash string) (bool, error)
- func (d *Driver) Leaves(ctx context.Context) ([]*merkle.Node, error)
- func (d *Driver) List(ctx context.Context) ([]*merkle.Node, error)
- func (d *Driver) ListParentRefs(ctx context.Context) ([]storage.ParentRef, error)
- func (d *Driver) ListSessions(ctx context.Context, opts storage.ListOpts) (*storage.Page[*merkle.Node], error)
- func (d *Driver) LoadDag(ctx context.Context, hash string) (*merkle.Dag, error)
- func (d *Driver) Open(ctx context.Context) error
- func (d *Driver) Put(ctx context.Context, n *merkle.Node) (bool, error)
- func (d *Driver) Roots(ctx context.Context) ([]*merkle.Node, error)
- func (d *Driver) UpdateUsage(ctx context.Context, hash string, usage *llm.Usage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) AncestryChain ¶ added in v0.5.0
func (*Driver) AncestryChains ¶ added in v0.5.0
func (*Driver) CountSessions ¶ added in v0.5.0
func (*Driver) GetByParent ¶ added in v0.5.0
func (*Driver) ListParentRefs ¶ added in v0.5.0
func (*Driver) ListSessions ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.