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 ¶
- type Store
- func (s *Store) DeleteSchema(ctx context.Context, connection string) error
- func (s *Store) GetSchema(ctx context.Context, connection string) (graphqlkit.StoredSchema, error)
- func (s *Store) LoadVectors(ctx context.Context, connection, schemaHash string) (map[string][]float32, error)
- func (s *Store) PutSchema(ctx context.Context, schema graphqlkit.StoredSchema) 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 persists graphql schemas and operation embeddings.
func (*Store) DeleteSchema ¶
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.