Documentation
¶
Index ¶
- func CompileForEngine(engine string, q queryir.Query) (queryir.Compiled, error)
- func CompilePostgres(q queryir.Query) (queryir.Compiled, error)
- func CompilePostgresWarehouse(q queryir.Query) (queryir.Compiled, error)
- type DemoAI
- type DemoExecutor
- type EngineDefinition
- type FileCatalog
- type FileConnectionSecretStore
- func (s *FileConnectionSecretStore) DeleteConnectionSecret(id string) error
- func (s *FileConnectionSecretStore) GetConnectionSecret(id string) (core.ConnectionRequest, error)
- func (s *FileConnectionSecretStore) ListConnectionSecrets() (map[string]core.ConnectionRequest, error)
- func (s *FileConnectionSecretStore) SaveConnectionSecret(id string, value core.ConnectionRequest) error
- type FileMetadataStore
- func (s *FileMetadataStore) All() (map[string]core.TableAnnotation, error)
- func (s *FileMetadataStore) GetTableAnnotation(databaseID, schema, table string) (core.TableAnnotation, error)
- func (s *FileMetadataStore) SaveTableAnnotation(databaseID, schema, table string, value core.TableAnnotation) error
- type SQLConnector
- func (p *SQLConnector) Close(id string) error
- func (p *SQLConnector) CloseAll() error
- func (p *SQLConnector) Compile(q queryir.Query) (queryir.Compiled, error)
- func (p *SQLConnector) CompileWarehouse(q queryir.Query) (queryir.Compiled, error)
- func (p *SQLConnector) Connect(ctx context.Context, input core.ConnectionRequest) (core.Database, error)
- func (p *SQLConnector) Connected(id string) bool
- func (p *SQLConnector) Engine(databaseID string) (string, error)
- func (p *SQLConnector) Execute(ctx context.Context, databaseID, statement string, args ...any) (core.QueryResult, error)
- func (p *SQLConnector) Materialize(ctx context.Context, spec core.MaterializeSpec) (core.MaterializeResult, error)
- func (p *SQLConnector) Tables(ctx context.Context, databaseID string) ([]core.Table, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileForEngine ¶
Types ¶
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
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 (s *FileMetadataStore) All() (map[string]core.TableAnnotation, error)
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) CompileWarehouse ¶
func (*SQLConnector) Connect ¶
func (p *SQLConnector) Connect(ctx context.Context, input core.ConnectionRequest) (core.Database, error)
func (*SQLConnector) Connected ¶
func (p *SQLConnector) Connected(id string) bool
func (*SQLConnector) Execute ¶
func (p *SQLConnector) Execute(ctx context.Context, databaseID, statement string, args ...any) (core.QueryResult, error)
func (*SQLConnector) Materialize ¶
func (p *SQLConnector) Materialize(ctx context.Context, spec core.MaterializeSpec) (core.MaterializeResult, error)