adapters

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileForEngine

func CompileForEngine(engine string, q queryir.Query) (queryir.Compiled, error)

func CompilePostgres

func CompilePostgres(q queryir.Query) (queryir.Compiled, error)

func CompilePostgresWarehouse

func CompilePostgresWarehouse(q queryir.Query) (queryir.Compiled, error)

Types

type DemoAI

type DemoAI struct{}

func (DemoAI) Ask

func (DemoAI) Ask(_ context.Context, _ string, databaseID string) (core.ChatResponse, error)

type DemoExecutor

type DemoExecutor struct{}

DemoExecutor keeps the UI runnable before a source adapter is configured.

func (DemoExecutor) Execute

func (DemoExecutor) Execute(_ context.Context, databaseID, sql string, _ ...any) (core.QueryResult, error)

type EngineDefinition

type EngineDefinition struct {
	ID              string   `json:"id"`
	Label           string   `json:"label"`
	Family          string   `json:"family"`
	DefaultPort     int      `json:"default_port,omitempty"`
	Network         bool     `json:"network"`
	SSH             bool     `json:"ssh"`
	Username        bool     `json:"username"`
	DefaultUsername string   `json:"default_username,omitempty"`
	DSNExample      string   `json:"dsn_example"`
	Compatible      []string `json:"compatible,omitempty"`
}

func EngineDefinitions

func EngineDefinitions() []EngineDefinition

type FileCatalog

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

FileCatalog is a development catalog. It persists non-secret connection metadata only; source DSNs remain in the running process and should be supplied by a secret manager in production.

func NewFileCatalog

func NewFileCatalog(path string) *FileCatalog

func (*FileCatalog) Delete

func (c *FileCatalog) Delete(id string) error

func (*FileCatalog) List

func (c *FileCatalog) List() ([]core.Database, error)

func (*FileCatalog) Save

func (c *FileCatalog) Save(database core.Database) error

type FileConnectionSecretStore

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

FileConnectionSecretStore is the local-development secret store. Its file and parent directory are owner-only; deployments should replace it with a KMS-backed implementation.

func NewFileConnectionSecretStore

func NewFileConnectionSecretStore(path string) *FileConnectionSecretStore

func (*FileConnectionSecretStore) DeleteConnectionSecret

func (s *FileConnectionSecretStore) DeleteConnectionSecret(id string) error

func (*FileConnectionSecretStore) GetConnectionSecret

func (s *FileConnectionSecretStore) GetConnectionSecret(id string) (core.ConnectionRequest, error)

func (*FileConnectionSecretStore) ListConnectionSecrets

func (s *FileConnectionSecretStore) ListConnectionSecrets() (map[string]core.ConnectionRequest, error)

func (*FileConnectionSecretStore) SaveConnectionSecret

func (s *FileConnectionSecretStore) SaveConnectionSecret(id string, value core.ConnectionRequest) error

type FileMetadataStore

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

func NewFileMetadataStore

func NewFileMetadataStore(path string) *FileMetadataStore

func (*FileMetadataStore) All

func (*FileMetadataStore) GetTableAnnotation

func (s *FileMetadataStore) GetTableAnnotation(databaseID, schema, table string) (core.TableAnnotation, error)

func (*FileMetadataStore) SaveTableAnnotation

func (s *FileMetadataStore) SaveTableAnnotation(databaseID, schema, table string, value core.TableAnnotation) error

type SQLConnector

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

func NewPostgresConnector

func NewPostgresConnector() *SQLConnector

NewPostgresConnector remains for source compatibility with earlier Topbase integrations. New code should use NewSQLConnector.

func NewSQLConnector

func NewSQLConnector() *SQLConnector

func (*SQLConnector) Close

func (p *SQLConnector) Close(id string) error

func (*SQLConnector) CloseAll

func (p *SQLConnector) CloseAll() error

CloseAll releases every source connection and SSH tunnel owned by this process. Container shutdown calls this after HTTP requests have drained.

func (*SQLConnector) Compile

func (p *SQLConnector) Compile(q queryir.Query) (queryir.Compiled, error)

func (*SQLConnector) CompileWarehouse

func (p *SQLConnector) CompileWarehouse(q queryir.Query) (queryir.Compiled, error)

func (*SQLConnector) Connect

func (*SQLConnector) Connected

func (p *SQLConnector) Connected(id string) bool

func (*SQLConnector) Engine

func (p *SQLConnector) Engine(databaseID string) (string, error)

func (*SQLConnector) Execute

func (p *SQLConnector) Execute(ctx context.Context, databaseID, statement string, args ...any) (core.QueryResult, error)

func (*SQLConnector) Materialize

func (*SQLConnector) Tables

func (p *SQLConnector) Tables(ctx context.Context, databaseID string) ([]core.Table, error)

Directories

Path Synopsis
Package webhook builds and delivers notifications to configured channels.
Package webhook builds and delivers notifications to configured channels.

Jump to

Keyboard shortcuts

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