graphqlstore

package
v1.131.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package graphqlstore is the PostgreSQL persistence behind the platform's graphql connection kind: the schema each connection was last read with, and the per-operation embedding vectors that ranking scores against.

It is the concrete for two contracts the toolkit declares (graphql.SchemaStore and graphql.VectorReader) plus the vector writes the index-jobs consumer performs. Keeping it here rather than under pkg/ is what keeps the toolkit free of a database dependency: a deployment with no database still registers graphql connections, introspects them at startup, and ranks them lexically.

Index

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 persists graphql schemas and operation embeddings.

func New

func New(db *sql.DB) *Store

New builds a store over the platform's database handle.

func (*Store) DeleteSchema

func (s *Store) DeleteSchema(ctx context.Context, connection string) error

DeleteSchema removes a connection's schema and every embedding built from it. A connection that is gone must not leave an index behind for a later connection of the same name to inherit.

func (*Store) GetSchema

func (s *Store) GetSchema(ctx context.Context, connection string) (graphqlkit.StoredSchema, error)

GetSchema returns a connection's stored schema.

func (*Store) LoadVectors

func (s *Store) LoadVectors(ctx context.Context, connection, schemaHash string) (map[string][]float32, error)

LoadVectors returns the persisted embeddings for one connection's schema version, keyed by operation id.

func (*Store) PutSchema

func (s *Store) PutSchema(ctx context.Context, schema graphqlkit.StoredSchema) error

PutSchema writes a connection's schema, replacing any previous one.

Jump to

Keyboard shortcuts

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